﻿/* =========================================================
   SCPL FRONT WEBSITE - PROPER RESPONSIVE CSS
   File: public/css/frontweb.css

   ========================================================= */

:root {
    --green-dark: #052e16;
    --green-main: #15803d;
    --green-soft: #dcfce7;
    --yellow-main: #facc15;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-soft: #e2e8f0;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.10);
    --shadow-hover: 0 25px 60px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: #f8fafc;
    color: var(--text-dark);
    font-family: Inter, Arial, Helvetica, sans-serif;
}

/* HEADER */

header {
    border-bottom: 1px solid var(--border-soft);
}

header nav {
    min-height: 80px;
}

header a {
    text-decoration: none;
}

header img {
    background: #ffffff;
}

/* MAIN MENU */

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    border: 1px solid var(--border-soft);
}

.dropdown-menu a {
    white-space: nowrap;
}

/* HERO */

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-float-up {
    animation: floatUp 0.9s ease-out both;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

.animate-slow-zoom {
    animation: slowZoom 10s ease-in-out infinite alternate;
}

/* TEXT */

h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
}

p {
    line-height: 1.75;
}

/* BUTTONS */

a,
button {
    transition: all 0.25s ease;
}

a:hover,
button:hover {
    transform: translateY(-1px);
}

/* CARDS */

article,
.shadow,
.shadow-xl,
.rounded-3xl {
    transition: all 0.3s ease;
}

.shadow,
.shadow-xl {
    box-shadow: var(--shadow-soft) !important;
}

article:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover) !important;
}

article.bg-white,
.bg-white.rounded-3xl,
.bg-slate-50.rounded-3xl,
.bg-green-50.rounded-3xl {
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* EQUAL HEIGHT CARDS */

#projects article,
#investment article,
#social-responsibility article {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#projects article > div:last-child,
#investment article > div:last-child,
#social-responsibility article > div:last-child {
    flex: 1;
}

/* IMAGES */

img {
    max-width: 100%;
}

#projects article img,
#investment article img,
#social-responsibility article img {
    width: 100%;
    object-fit: cover;
    object-position: center;
}

#director img {
    object-position: center top;
}

#testimonials img {
    object-fit: cover;
    object-position: center;
}

/* FORMS */

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1 !important;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-main) !important;
    box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.14) !important;
}

label {
    color: var(--text-dark);
}

/* FOOTER */

footer {
    margin-top: 0 !important;
}

footer a {
    transition: all 0.2s ease;
}

footer a:hover {
    transform: translateX(5px);
}

/* MOBILE MENU */

@media (max-width: 1023px) {
    header nav {
        min-height: 72px;
    }

    header ul {
        padding: 0.75rem 0;
    }

    header li {
        border-bottom: 1px solid #e2e8f0;
    }

    header li:last-child {
        border-bottom: 0;
    }

    header nav ul > li > a {
        padding: 0.9rem 1.25rem !important;
    }

    .dropdown-menu {
        display: block !important;
        position: static !important;
        width: 100% !important;
        min-width: 100% !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #f8fafc !important;
    }

    .dropdown-menu a {
        padding-left: 2.25rem !important;
        font-size: 0.92rem;
    }
}

/* TABLET AND MOBILE */

@media (max-width: 768px) {
    section {
        padding-top: 3.25rem !important;
        padding-bottom: 3.25rem !important;
    }

    h1 {
        font-size: 2.15rem !important;
        line-height: 1.15 !important;
    }

    h2 {
        font-size: 1.85rem !important;
        line-height: 1.2 !important;
    }

    h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    p {
        font-size: 0.98rem;
    }

    .p-6,
    .p-7 {
        padding: 1.25rem !important;
    }

    .rounded-3xl {
        border-radius: 1.25rem !important;
    }

    .rounded-\[2rem\] {
        border-radius: 1.35rem !important;
    }

    #director .grid {
        text-align: center;
    }

    #director img {
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }

    form {
        padding: 1.25rem !important;
    }

    #projects article img,
    #investment article img,
    #social-responsibility article img {
        height: 220px !important;
    }
}

/* SMALL MOBILE */

@media (max-width: 480px) {
    h1 {
        font-size: 1.9rem !important;
    }

    h2 {
        font-size: 1.65rem !important;
    }

    .text-lg {
        font-size: 0.98rem !important;
    }

    .grid {
        gap: 1.25rem !important;
    }

    .py-16 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    a[class*="px-6"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    a[class*="py-3"] {
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
    }
}
/* =========================================================
   SCPL MENU + LAYOUT FINAL FIX
   Add this at bottom of public/css/frontweb.css
   ========================================================= */

/* Header must stay above all sections */
header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Header layout */
header nav {
    position: relative;
}

/* Desktop menu */
@media (min-width: 1024px) {
    header nav > div {
        display: block !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    header nav ul {
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem;
        padding: 0 !important;
        margin: 0 !important;
    }

    header nav ul li {
        position: relative;
        border: 0 !important;
        width: auto !important;
    }

    header nav ul li a {
        width: auto !important;
        white-space: nowrap;
    }

    .dropdown-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: auto !important;
        min-width: 18rem !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 0 0 1rem 1rem !important;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14) !important;
        overflow: hidden;
        z-index: 99999 !important;
    }

    .dropdown:hover .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu a {
        display: block !important;
        padding: 0.75rem 1.25rem !important;
        color: #0f172a !important;
        white-space: nowrap;
    }

    .dropdown-menu a:hover {
        background: #f0fdf4 !important;
        color: #15803d !important;
        transform: none !important;
    }
}

/* Mobile menu */
@media (max-width: 1023px) {
    header nav {
        min-height: 72px;
        flex-wrap: nowrap;
    }

    header nav > div {
        position: absolute !important;
        top: 72px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16) !important;
        z-index: 99999 !important;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    header nav ul {
        display: block !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        margin: 0 !important;
    }

    header nav ul li {
        width: 100% !important;
        border-bottom: 1px solid #e2e8f0;
    }

    header nav ul li:last-child {
        border-bottom: 0;
    }

    header nav ul li a {
        display: block !important;
        width: 100% !important;
        padding: 0.85rem 1.25rem !important;
    }

    .dropdown-menu {
        display: block !important;
        position: static !important;
        width: 100% !important;
        min-width: 100% !important;
        background: #f8fafc !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .dropdown-menu a {
        padding-left: 2.5rem !important;
        font-size: 0.92rem !important;
        color: #334155 !important;
    }

    .dropdown-menu a:hover {
        background: #dcfce7 !important;
        color: #15803d !important;
        transform: none !important;
    }

    header label[for="mobile-menu-toggle"] {
        display: block !important;
        line-height: 1;
    }
}

/* Prevent dropdown going behind hero */
main {
    position: relative;
    z-index: 1;
}

/* Better content width */
.max-w-7xl {
    max-width: 80rem !important;
}

/* Fix logo area */
header a.flex {
    min-width: max-content;
}

/* Mobile logo text */
@media (max-width: 480px) {
    header img {
        width: 3rem !important;
        height: 3rem !important;
    }

    header .text-2xl {
        font-size: 1.35rem !important;
    }

    header .text-xs {
        font-size: 0.68rem !important;
    }
}