/* ==========================================================================
   ARC Ambalaj — Main Stylesheet
   Navy #0e2464 | Red accent #e21f1b | White #fefefe
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy: #0e2464;
    --navy-dark: #091a4a;
    --navy-light: #1a3a8f;
    --red: #e21f1b;
    --white: #fefefe;
    --off-white: #f7f7f5;
    --warm-gray: #f0eeeb;
    --text: #1a1a1a;
    --text-mid: #4a4a4a;
    --text-light: #6b6b6b;
    --border: #e0ddd8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
    --radius: 4px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --container: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: var(--navy); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn-primary:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

.btn-outline--light {
    color: var(--white);
    border-color: rgba(255,255,255,.5);
}
.btn-outline--light:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}
.btn-whatsapp:hover {
    background: #1fb855;
    border-color: #1fb855;
}

/* --- Section --- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}

.section-tag--light { color: rgba(255,255,255,.7); }

.section-title {
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-mid);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 84px;
}

.site-logo img { height: 44px; width: auto; }
.site-logo { margin-right: 48px; flex-shrink: 0; }

/* --- Nav Menu --- */
.main-nav { flex: 1; display: flex; justify-content: center; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 30px 16px;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text);
    transition: var(--transition);
    letter-spacing: .01em;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: var(--navy);
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

.dropdown-arrow { transition: transform var(--transition); }
.nav-menu > li:hover .dropdown-arrow { transform: rotate(180deg); }

/* --- Simple Vertical Dropdown (Ankutsan style) --- */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 2px solid var(--navy);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: .85rem;
    color: var(--text-mid);
    transition: var(--transition);
    border-bottom: 1px solid var(--warm-gray);
}

.sub-menu li:last-child a { border-bottom: none; }

.sub-menu li a:hover {
    background: var(--off-white);
    color: var(--navy);
    padding-left: 24px;
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Language Switcher --- */
.lang-switcher { position: relative; }

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}
.lang-current:hover { background: var(--warm-gray); }

.lang-current .flag-icon,
.lang-dropdown .flag-icon {
    display: inline-block;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.flag-tr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect fill='%23E30A17' width='1200' height='800'/%3E%3Ccircle fill='%23fff' cx='480' cy='400' r='200'/%3E%3Ccircle fill='%23E30A17' cx='530' cy='400' r='160'/%3E%3Cpolygon fill='%23fff' points='583,400 650,430 620,370 660,420 600,400' transform='rotate(-18 640 400) scale(1.6) translate(-200,-130)'/%3E%3C/svg%3E"); }
.flag-en { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0v30h60V0z'/%3E%3Cpath stroke='%23fff' stroke-width='6' d='M0 0l60 30m0-30L0 30'/%3E%3Cpath stroke='%23C8102E' stroke-width='4' d='M0 0l60 30m0-30L0 30' clip-path='url(%23a)'/%3E%3Cpath stroke='%23fff' stroke-width='10' d='M30 0v30M0 15h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='6' d='M30 0v30M0 15h60'/%3E%3C/g%3E%3C/svg%3E"); }
.flag-de { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Crect fill='%23000' width='5' height='3'/%3E%3Crect fill='%23D00' y='1' width='5' height='2'/%3E%3Crect fill='%23FFCE00' y='2' width='5' height='1'/%3E%3C/svg%3E"); }
.flag-ru { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect fill='%23fff' width='9' height='3'/%3E%3Crect fill='%230039A6' y='2' width='9' height='2'/%3E%3Crect fill='%23D52B1E' y='4' width='9' height='2'/%3E%3C/svg%3E"); }
.flag-es { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 4'%3E%3Crect fill='%23AA151B' width='6' height='4'/%3E%3Crect fill='%23F1BF00' y='1' width='6' height='2'/%3E%3C/svg%3E"); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: var(--transition);
    overflow: hidden;
}

.lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--text-mid);
    transition: var(--transition);
}
.lang-dropdown a:hover {
    background: var(--off-white);
    color: var(--navy);
}

/* --- Mobile Toggle --- */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(14, 36, 100, .78) 0%,
        rgba(14, 36, 100, .55) 40%,
        rgba(14, 36, 100, .2) 75%,
        rgba(14, 36, 100, .05) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 84px; /* header offset */
    padding-left: 40px;
}

.hero-tag {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    margin-bottom: 20px;
    padding-left: 2px;
}

.hero-title {
    color: var(--white);
    font-family: var(--font);
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 24px;
    max-width: 700px;
}

.hero-subtitle {
    color: rgba(255,255,255,.85);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}
.hero-actions .btn-primary:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.hero-actions .btn-outline {
    color: var(--white);
    border-color: rgba(255,255,255,.4);
}
.hero-actions .btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ==========================================================================
   CATEGORIES
   ========================================================================== */
.categories { background: var(--white); }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.category-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-img {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
}

.category-card:hover .category-img img {
    transform: scale(1.06);
}

.category-info {
    padding: 28px;
}

.category-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.category-info p {
    color: var(--text-mid);
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.category-count {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--navy);
    padding: 4px 12px;
    background: rgba(14,36,100,.06);
    border-radius: 20px;
}

/* ==========================================================================
   ABOUT STRIP
   ========================================================================== */
.about-strip {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.about-strip-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.about-strip-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(14, 36, 100, .92) 0%,
        rgba(14, 36, 100, .75) 60%,
        rgba(14, 36, 100, .55) 100%
    );
}

.about-strip-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.about-strip-content h2 {
    color: var(--white);
    font-family: var(--font);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.about-strip-content p {
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 32px;
}

/* ==========================================================================
   STATISTICS
   ========================================================================== */
.stats {
    background: var(--navy);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat-item {
    position: relative;
    padding: 40px 24px;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255,255,255,.12);
}

.stat-number {
    display: block;
    font-family: var(--font);
    font-size: clamp(2.5rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    letter-spacing: -.02em;
}

.stat-suffix {
    font-family: var(--font);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    color: rgba(255,255,255,.7);
    margin-left: 2px;
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-size: .8rem;
    font-weight: 500;
    color: rgba(255,255,255,.5);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ==========================================================================
   CERTIFICATES
   ========================================================================== */
.certificates { background: var(--white); }

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 640px;
    margin: 0 auto;
}

.cert-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 40px 32px 32px;
    background: var(--off-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.cert-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cert-card-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin-bottom: 20px;
}

.cert-card-img img {
    max-width: 200px;
    max-height: 240px;
    width: auto;
    height: auto;
    border-radius: var(--radius);
    cursor: pointer;
}

.cert-card-text {
    flex-shrink: 0;
}

.cert-card-text h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.cert-card-text p {
    color: var(--text-light);
    font-size: .85rem;
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
    background: var(--white);
    padding: 80px 0;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 56px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cta-text { max-width: 500px; }

.cta-text h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 12px;
}

.cta-text p {
    color: var(--text-mid);
    font-size: .95rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.75);
}

.footer-main { padding: 64px 0 48px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 48px;
}

.footer-logo {
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.footer-desc {
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 20px;
    color: rgba(255,255,255,.6);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.6);
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--red);
    color: #fff;
}

.footer-col h4 {
    color: var(--white);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
    font-size: .875rem;
    color: rgba(255,255,255,.55);
    transition: var(--transition);
}
.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 14px;
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(255,255,255,.35);
}

.footer-contact a {
    color: rgba(255,255,255,.55);
    transition: var(--transition);
}
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
}

.footer-bottom p {
    font-size: .8rem;
    color: rgba(255,255,255,.35);
    text-align: center;
}

/* ==========================================================================
   WHATSAPP FAB
   ========================================================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(37,211,102,.4);
    transition: var(--transition);
}
.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37,211,102,.5);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2)::after { display: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-inner { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; }
    .stat-item:nth-child(even)::after { display: none; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 84px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 24px;
        transform: translateX(100%);
        transition: transform var(--transition);
        overflow-y: auto;
    }
    .main-nav.open { transform: translateX(0); }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-menu > li > a {
        padding: 16px 0;
        border-bottom: 1px solid var(--warm-gray);
        font-size: 1rem;
    }

    .nav-menu > li > a::after { display: none; }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: none;
        padding-left: 16px;
        display: none;
    }

    .sub-menu.open { display: block; }

    .sub-menu li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--warm-gray);
    }

    .header-actions { display: none; }

    .hero { min-height: 80vh; }
    .hero-title { font-size: 2.2rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .categories-grid { grid-template-columns: 1fr; }

    .section { padding: 64px 0; }
    .about-strip { padding: 80px 0; }
    .about-strip-bg { background-attachment: scroll; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .stat-item::after { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .cta-actions { flex-direction: column; width: 100%; }
    .cta-actions .btn { width: 100%; justify-content: center; }
    .cta-inner { padding: 32px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: .95rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
