/* ===== CSS Custom Properties ===== */
:root {
    --color-primary: #1a365d;
    --color-primary-light: #2a5298;
    --color-primary-dark: #0f2440;
    --color-accent: #e8a838;
    --color-accent-light: #f0c060;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-bg-dark: #1a202c;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    color: var(--color-primary);
    line-height: 1.3;
    font-weight: 700;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 0.75rem;
}

/* ===== Layout Containers ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

/* ===== Header / Navigation ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(240, 242, 245, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: background var(--transition);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
    background: rgba(26, 54, 93, 0.08);
}

/* Hamburger menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    width: 26px;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 72px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center 76%;
    background-attachment: fixed;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 54, 93, 0.88) 0%,
        rgba(42, 82, 152, 0.78) 50%,
        rgba(15, 36, 64, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem 1.5rem;
}

.hero h1 {
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero .tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 0.95rem 2.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(232, 168, 56, 0.35);
}

.hero-cta:hover {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.45);
}

.hero-cta svg {
    width: 18px;
    height: 18px;
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Services Grid ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card-icon {
    margin: -2.5rem -2rem 1.5rem;
    width: calc(100% + 4rem);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-card-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(26, 54, 93, 0.08) 100%
    );
    pointer-events: none;
}

.service-card-icon img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-icon img {
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.service-card ul {
    list-style: none;
    text-align: left;
    margin-top: 1rem;
}

.service-card ul li {
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.service-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* ===== Partners Section ===== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.partner-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    text-align: center;
}

.partner-card:hover {
    box-shadow: var(--shadow-md);
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.partner-logo img {
    max-height: 100%;
    max-width: 260px;
    object-fit: contain;
    margin: 0 auto;
    transition: transform var(--transition);
}

.partner-card:hover .partner-logo img {
    transform: scale(1.05);
}

.partner-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    padding: 2.5rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.contact-info .contact-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0;
    color: var(--color-text);
    font-size: 0.95rem;
}

.contact-detail svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary-light);
    flex-shrink: 0;
}

.contact-detail a {
    color: var(--color-text);
}

.contact-detail a:hover {
    color: var(--color-primary-light);
}

/* ===== Contact Form ===== */
.contact-form-wrapper {
    padding: 2.5rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.contact-form-wrapper h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group label .required {
    color: #e53e3e;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-note {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.form-privacy {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.form-privacy a {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
    height: 36px;
    width: auto;
    opacity: 0.85;
    filter: brightness(1.2);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary-light);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 1.85rem;
    }

    .container {
        padding: 0 2rem;
    }

    /* iOS fix: background-attachment: fixed breaks on mobile Safari */
    .hero-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.95rem 1.25rem;
        font-size: 1.05rem;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--color-white);
        background: rgba(255, 255, 255, 0.12);
    }

    .nav-toggle {
        display: flex;
        padding: 8px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .service-card {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .partner-card {
        padding: 1.75rem;
    }

    .hero {
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-header h2 {
        font-size: 1.65rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero-cta {
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .service-card-icon {
        margin: -2rem -1.5rem 1.25rem;
        width: calc(100% + 3rem);
    }

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

    .contact-info,
    .contact-form-wrapper {
        padding: 1.75rem;
    }

    .container {
        padding: 0 1.25rem;
    }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .partner-card {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }

    .partner-card:nth-child(1) { animation-delay: 0.1s; }
    .partner-card:nth-child(2) { animation-delay: 0.2s; }

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