/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
:root {
    /* Colors */
    --primary-color: #003566;
    --primary-light: #004d80;
    --primary-dark: #002244;
    --text-color: #111111;
    --text-light: #555555;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --error-color: #dc3545;
    --success-color: #28a745;
    
    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Proza Libre', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 4px;
    --transition-speed: 0.3s;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 600; }

p {
    margin-bottom: var(--spacing-sm);
}

ul {
    list-style: none;
}

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

a:hover, a:focus {
    color: var(--primary-light);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* ==========================================================================
   Layout & Components
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

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

.center {
    text-align: center;
}

.section-header {
    margin-bottom: var(--spacing-lg);
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1000;
}
.skip-link:focus {
    top: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover, .btn-outline:focus {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--bg-color);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo img {
    height: 60px;
    width: auto;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.main-nav a:not(.btn) {
    color: var(--text-color);
    font-weight: 500;
}

.main-nav a:not(.btn):hover, .main-nav a:not(.btn):focus {
    color: var(--primary-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    isolation: isolate;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 53, 102, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

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

.hero-content h1 {
    color: white;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text .subtitle {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed) ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.service-card ul {
    margin-top: var(--spacing-sm);
}

.service-card li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-card li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ==========================================================================
   Why Us Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    font-size: 24px;
    border-radius: 50%;
    margin-bottom: var(--spacing-sm);
}

.feature p {
    color: var(--text-light);
}

/* ==========================================================================
   Reviews Section
   ========================================================================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.review-card {
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.review-stars {
    color: #f5b301;
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

.review-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.review-author {
    font-weight: 600;
    color: var(--primary-color);
}

.reviews-note {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.info-items {
    margin-top: var(--spacing-md);
}

.info-item {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.info-item a {
    display: block;
    margin-top: 0.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.contact-form-container {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.hidden-field {
    display: none;
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease;
}

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

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#form-messages {
    margin-bottom: var(--spacing-sm);
    padding: 10px;
    border-radius: var(--border-radius);
    display: none;
}

#form-messages.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-messages.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--primary-dark);
    color: white;
    padding: var(--spacing-md) 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .about-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .main-nav {
        margin-top: var(--spacing-sm);
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}
