/* ===========================
   CSS Variables
   =========================== */
:root {
    /* Colors */
    --color-primary: #667eea;
    --color-primary-dark: #764ba2;
    --color-secondary: #2c3e50;
    --color-text: #333;
    --color-text-light: #7f8c8d;
    --color-white: #ffffff;
    --color-background: #f8f9fa;
    --color-border: #e0e0e0;
    --color-success: #0b8a3e;
    --color-error: #c02323;
    
    /* Hero/Contact Gradient */
    --gradient-hero: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e57c2 100%);
    --gradient-button: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.95rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2.5rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height: 1.6;
    
    /* Borders & Radius */
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    --border-radius-full: 50px;
    --border-width: 2px;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.6s ease;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
    width: 100%;
    scroll-behavior: auto; /* JavaScript handles custom smooth scrolling */
    scroll-padding-top: 80px; /* Account for fixed navbar */
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height);
    color: var(--color-text);
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   Navigation Bar
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-nav {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    letter-spacing: -0.5px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.language-toggle {
    display: flex;
    gap: var(--spacing-xs);
}

.lang-btn {
    background: transparent;
    border: var(--border-width) solid var(--color-border);
    padding: var(--spacing-xs) 0.8rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.1);
}

.lang-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.flag {
    display: inline-block;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--spacing-xs);
    margin-right: var(--spacing-md);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-secondary);
    margin: 4px 0;
    transition: all 0.5s ease;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-7px, -7px);
}

/* ===========================
   Hero Section - Main Design
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: var(--spacing-lg);
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    width: 300px;
    height: auto;
    margin: 0 auto var(--spacing-lg);
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

/* Typography */
.tagline {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
}

.description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
    font-weight: 300;
}

/* CTA Section */
.cta-section {
    margin-bottom: var(--spacing-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--color-white);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    transition: all var(--transition-fast);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: var(--border-width) solid transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

.btn:active {
    transform: translateY(-1px);
}

/* Footer */
.footer-social {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        left: 0;
        top: 60px;
        flex-direction: column;
        background-color: var(--color-white);
        width: 100%;
        text-align: center;
        transition: all 0.5s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-lg) 0;
        gap: var(--spacing-sm);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero {
        padding: var(--spacing-md);
    }

    .hero-content {
        max-width: 100%;
    }

    .logo {
        width: 200px;
        margin-bottom: var(--spacing-md);
    }

    .tagline {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .description {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
    }

    .btn {
        padding: 0.9rem 1.8rem;
        font-size: var(--font-size-base);
    }
}

@media (max-width: 480px) {
    .tagline {
        font-size: var(--font-size-xl);
    }

    .description {
        font-size: var(--font-size-sm);
    }

    .btn {
        flex-direction: column;
        padding: 0.8rem var(--spacing-md);
        gap: var(--spacing-xs);
    }

    .btn span {
        display: block;
    }
}

/* ===========================
   Container & Common Styles
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section-title {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xs);
    text-align: center;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* ===========================
   Services Section
   =========================== */
.services {
    padding: var(--spacing-xxl) 0;
    background: var(--color-background);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-fast);
    border-top: 4px solid var(--color-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
}

.service-card h3 {
    font-size: var(--font-size-xl);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ===========================
   Contact Form Section
   =========================== */
.contact {
    padding: var(--spacing-xxl) 0;
    background: var(--gradient-hero);
}

.contact .section-title {
    color: var(--color-white);
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

/* Input wrapper for validation icon positioning */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem var(--spacing-sm);
    padding-right: 45px; /* Make room for validation icon */
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

/* Validation icon (checkmark) */
.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #0b8a3e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Show validation icon when input is valid */
.input-wrapper.valid .validation-icon {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Animation on appearing */
.input-wrapper .validation-icon {
    transform: translateY(-50%) scale(0.5);
}

.input-wrapper.valid .validation-icon {
    transform: translateY(-50%) scale(1);
}

/* Error icon (red X) */
.error-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #c02323;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Show error icon when input is invalid */
.input-wrapper.invalid .error-icon {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Animation on appearing */
.input-wrapper .error-icon {
    transform: translateY(-50%) scale(0.5);
}

.input-wrapper.invalid .error-icon {
    transform: translateY(-50%) scale(1);
}

/* Update input border color for invalid state */
.input-wrapper.invalid input,
.input-wrapper.invalid textarea {
    border-color: #c02323;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-form textarea {
    resize: vertical;
}

/* Form feedback message under the form */
.contact-form .form-feedback {
    margin-top: 12px;
    font-size: var(--font-size-sm);
}

/* Small toast used for ephemeral messages */
.site-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    padding: 10px 16px;
    color: var(--color-white);
    background: var(--color-success);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(11,138,62,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 9999;
}
.site-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
    pointer-events: auto;
}

/* Centered success modal */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 10000;
}
.contact-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.contact-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: var(--color-white);
    color: var(--color-text);
    width: min(92vw, 520px);
    padding: 24px 20px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 10001;
}
.contact-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.contact-modal-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 8px;
}
.contact-modal-body {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    margin: 0 0 8px;
}
.contact-modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text-light);
}
.contact-modal-close:hover {
    color: var(--color-secondary);
}

/* Success visual state for the form */
.contact-form.success {
    border: 1px solid rgba(11,138,62,0.15);
    box-shadow: 0 8px 28px rgba(11,138,62,0.08);
    border-radius: var(--border-radius-md);
    padding: 10px;
}
.contact-form.success input,
.contact-form.success textarea {
    border-color: var(--color-success);
}

/* Contact section two-column layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: stretch;
    margin-top: 20px;
}

.contact-column {
    background: transparent;
}

.contact-form-column .contact-form {
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-form-column .contact-form button[type="submit"] {
    margin-top: auto;
}

.contact-info {
    background: rgba(255,255,255,0.95);
    padding: 18px 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0,0,0,0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-info h3 {
    margin-bottom: 10px;
    font-size: var(--font-size-lg);
    color: var(--color-secondary);
}

.contact-item {
    margin: 10px 0;
    line-height: 1.4;
    color: var(--color-text);
}

.contact-link {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
}
.contact-link:hover { 
    text-decoration: underline;
    color: var(--color-primary-dark);
}

@media (max-width: 880px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-info { order: 2; }
}

/* Map embed styles */
.map-embed {
    margin-top: 14px;
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}
.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.map-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
}
.map-link:hover { text-decoration: underline; }
.btn-submit {
    width: 100%;
    background: var(--gradient-button);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ===========================
   Responsive for Sections
   =========================== */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
    }

    .services {
        padding: var(--spacing-xl) 0;
    }

    .services-grid {
        gap: var(--spacing-md);
    }

    .service-card {
        padding: var(--spacing-md);
    }

    .contact {
        padding: var(--spacing-xl) 0;
    }

    .contact-form {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: var(--font-size-xl);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: var(--spacing-sm);
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem 0.75rem;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 var(--spacing-sm);
    }

    .logo-nav {
        font-size: var(--font-size-base);
    }

    .lang-btn {
        padding: 0.4rem 0.6rem;
        font-size: var(--font-size-base);
    }

    .hero {
        padding-top: 100px;
    }
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--color-secondary);
    padding: var(--spacing-lg) 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
}

.footer-content {
    flex: 1;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-sm);
    margin: 0;
}

.footer-container .footer-content {
    text-align: center;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: var(--spacing-md) 0;
    }

    .footer-container {
        padding: 0 var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .footer-content p {
        font-size: 0.9rem;
    }
}