/* ===== CSS Variables ===== */
:root {
    /* Colors - Elegant Palette */
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2744;
    --accent: #c9a962;
    --accent-light: #d4b978;

    /* Neutrals */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e2e8f0;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 8rem;
    --container-padding: 2rem;

    /* Transitions */
    --transition: 250ms ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #4a7ab8;
    --primary-light: #6b9bd1;
    --accent: #d4af37;
    --accent-light: #e5c45a;

    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;
    --border: #2d3748;
    --bg-primary: #0f1419;
    --bg-secondary: #1a2332;
    --bg-tertiary: #243042;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

em {
    font-style: italic;
    color: var(--primary);
}

[data-theme="dark"] em {
    color: var(--accent);
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

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

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

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width var(--transition);
}

[data-theme="dark"] .nav-link::after {
    background: var(--accent);
}

[data-theme="dark"] .logo-img {
    filter: brightness(0) invert(1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.btn-nav {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

[data-theme="dark"] .btn-nav {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-nav:hover {
    background: var(--primary);
    color: #fff;
}

[data-theme="dark"] .btn-nav:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}


/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--accent-light);
}

.btn-block {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding-top: 80px;
}

.hero-container {
    display: flex;
    align-items: center;
    padding: 4rem;
    padding-left: calc((100vw - 1200px) / 2 + 2rem);
}

.hero-content {
    max-width: 540px;
}

.hero-title {
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

.hero-image {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

/* ===== Services Section ===== */
.services {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-card {
    padding: 2.5rem 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .service-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .service-icon {
    color: var(--accent);
}

.service-card h3 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* ===== About Section ===== */
.about {
    padding: var(--section-padding) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
}

.about-content p {
    margin-top: 1.5rem;
    font-size: 1.05rem;
}

.about-content p:first-of-type {
    margin-top: 2rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.stat-item {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

[data-theme="dark"] .stat-number {
    color: var(--accent);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== Contact Section ===== */
.contact {
    padding: 76px 0 0 0;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-height: calc(100vh - 76px);
}

.contact-form-container {
    background: var(--bg-secondary);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.contact-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    background: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .contact-form {
    background: var(--bg-secondary);
    border-color: var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem 1.25rem;
    border: 1px solid #cbd5e0;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    transition: all var(--transition);
    font-size: 1rem;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-primary);
    border-color: var(--border);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--accent);
}

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

[data-theme="dark"] .footer {
    background: #0a0f14;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.contact-value {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
}

.footer-disclaimer {
    margin-top: 0.5rem;
    font-size: 0.8rem !important;
    opacity: 0.6;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all var(--transition);
    z-index: 999;
    border: 1px solid var(--border);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 3rem;
    max-width: 420px;
    width: 90%;
    position: relative;
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-logo {
    height: 50px;
    margin: 0 auto 1.5rem;
}

[data-theme="dark"] .modal-logo {
    filter: brightness(0) invert(1);
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-error {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-sm);
    color: #dc2626;
    font-size: 0.875rem;
}

.login-error.active {
    display: flex;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password {
    color: var(--primary);
    font-size: 0.875rem;
}

[data-theme="dark"] .forgot-password {
    color: var(--accent);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-container {
        padding: 6rem 2rem;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3rem;
    }

    .stat-item {
        border-bottom: none;
        padding-bottom: 0;
        text-align: center;
    }

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

    .contact-image {
        min-height: 400px;
    }

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

@media (max-width: 768px) {
    .contact {
        min-height: auto;
        padding-top: 80px;
    }

    .contact-form-container {
        padding: 3rem 2rem;
        min-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition);
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .btn-nav {
        display: none;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 4rem 1.5rem;
    }

    .contact-form-container {
        padding: 2rem 1.5rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-item {
        border-bottom: 1px solid var(--border);
        padding-bottom: 2rem;
    }

    .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}
