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

:root {
    /* Color Palette */
    --primary-color: #1a472a;
    --primary-light: #2d5a3d;
    --primary-dark: #0f2f1a;
    --secondary-color: #d4af37;
    --secondary-light: #e6c860;
    --secondary-dark: #b8941f;
    
    --accent-color: #ff6b35;
    --accent-light: #ff8c66;
    --accent-dark: #e55530;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: 2.25rem;
    --fs-5xl: 3rem;
    --fs-6xl: 3.75rem;
    
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    
    --lh-tight: 1.25;
    --lh-snug: 1.375;
    --lh-normal: 1.5;
    --lh-relaxed: 1.625;
    --lh-loose: 2;
    
    /* Spacing */
    --space-px: 1px;
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    --space-40: 10rem;
    --space-48: 12rem;
    --space-56: 14rem;
    --space-64: 16rem;
    
    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 0.125rem;
    --radius-base: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Layout */
    --container-max-width: 1200px;
    --header-height: 80px;
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* Dark mode color overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #111827;
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-900: #f9fafb;
        --black: #ffffff;
    }
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: var(--lh-normal);
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Focus Management */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-base);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

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

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--fs-4xl);
}

h2 {
    font-size: var(--fs-3xl);
}

h3 {
    font-size: var(--fs-2xl);
}

h4 {
    font-size: var(--fs-xl);
}

h5 {
    font-size: var(--fs-lg);
}

h6 {
    font-size: var(--fs-base);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--fs-5xl);
    }
    
    h2 {
        font-size: var(--fs-4xl);
    }
    
    h3 {
        font-size: var(--fs-3xl);
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: var(--fs-6xl);
    }
}

p {
    margin-bottom: var(--space-4);
    color: var(--gray-600);
}

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

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

/* Lists */
ul, ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

li {
    margin-bottom: var(--space-2);
    color: var(--gray-600);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

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

.btn--secondary {
    background-color: var(--secondary-color);
    color: var(--gray-900);
    border-color: var(--secondary-color);
}

.btn--secondary:hover {
    background-color: var(--secondary-light);
    border-color: var(--secondary-light);
    color: var(--gray-900);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn--outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn--full {
    width: 100%;
}

.btn__text {
    transition: opacity var(--transition-fast);
}

.btn__loading {
    position: absolute;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn--loading .btn__text {
    opacity: 0;
}

.btn--loading .btn__loading {
    opacity: 1;
}

/* Sections */
section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-4);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-2);
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: var(--fs-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--fs-4xl);
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

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

.nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-color);
    font-weight: var(--fw-bold);
    font-size: var(--fs-lg);
    text-decoration: none;
}

.nav__logo i {
    font-size: var(--fs-xl);
}

.nav__logo-text {
    font-family: var(--font-display);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__list {
    display: none;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: var(--gray-700);
    font-weight: var(--fw-medium);
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__contact {
    display: none;
}

.nav__phone {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-color);
    font-weight: var(--fw-medium);
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

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

.nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: var(--z-modal);
}

.nav__toggle-line {
    width: 100%;
    height: 2px;
    background-color: var(--gray-700);
    margin: 2px 0;
    transition: all var(--transition-fast);
    transform-origin: center;
}

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

.nav__toggle.active .nav__toggle-line:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (min-width: 768px) {
    .nav__list {
        display: flex;
    }
    
    .nav__contact {
        display: block;
    }
    
    .nav__toggle {
        display: none;
    }
}

/* Mobile Menu */
@media (max-width: 767px) {
    .nav__menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-6);
        transition: left var(--transition-base);
        z-index: var(--z-modal-backdrop);
    }
    
    .nav__menu.active {
        left: 0;
    }
    
    .nav__list {
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
        text-align: center;
    }
    
    .nav__link {
        font-size: var(--fs-lg);
    }
    
    .nav__contact {
        display: block;
    }
}

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    display: grid;
    gap: var(--space-12);
    align-items: center;
}

.hero__title {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-4);
    color: var(--primary-color);
}

.hero__title-highlight {
    color: var(--primary-color);
    position: relative;
}

.hero__title-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-light));
    opacity: 0.3;
    z-index: -1;
}

.hero__subtitle {
    font-size: var(--fs-xl);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
    font-weight: var(--fw-medium);
}

.hero__description {
    margin-bottom: var(--space-8);
}

.hero__description p {
    font-size: var(--fs-lg);
    color: var(--gray-600);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.hero__credentials {
    display: grid;
    gap: var(--space-4);
}

.credential {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-600);
    font-size: var(--fs-sm);
}

.credential i {
    color: var(--primary-color);
    font-size: var(--fs-base);
}

.hero__image {
    position: relative;
}

.hero__image-container {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.hero__img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero__image-overlay {
    position: absolute;
    bottom: var(--space-6);
    left: var(--space-6);
    right: var(--space-6);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
}

.hero__stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat__number {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--primary-color);
    line-height: 1;
}

.stat__label {
    font-size: var(--fs-sm);
    color: var(--gray-600);
    font-weight: var(--fw-medium);
}

.hero__floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: var(--fs-xl);
    animation: float 6s ease-in-out infinite;
    opacity: 0.1;
}

.floating-element--1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element--2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element--3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@media (min-width: 768px) {
    .hero__content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-16);
    }
    
    .hero__title {
        font-size: var(--fs-5xl);
    }
    
    .hero__credentials {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero__img {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero__title {
        font-size: var(--fs-6xl);
    }
    
    .hero__credentials {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: var(--z-fixed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    visibility: visible;
}

.invisible {
    visibility: hidden;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Print Styles */
@media print {
    .header,
    .footer,
    .back-to-top,
    .nav__toggle,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    section {
        page-break-inside: avoid;
    }
}
