/* ========================================
   Base Styles - Modern Landing Pages
======================================== */

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

/* HTML & Body */
html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Modern Layout */
.modern-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    width: 100%;
}

/* Skip Links for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: var(--z-max);
    transition: var(--transition-all);
}

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

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-max);
    transition: opacity 0.3s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

.preloader-logo {
    margin-bottom: var(--space-4);
}

.preloader-text {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--primary-color);
    letter-spacing: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-none);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

h6 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-colors);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

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

li {
    margin-bottom: var(--space-1);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

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

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

@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: var(--container-lg);
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: var(--container-xl);
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: var(--container-xxl);
    }
}

/* Section Spacing */
.section {
    padding: var(--space-16) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-20) 0;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: var(--z-fixed);
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    transform: translateY(100%);
    transition: var(--transition-transform);
    z-index: var(--z-toast);
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-xl);
    margin: 0 auto;
    gap: var(--space-4);
}

.cookie-text p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.cookie-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-20);
    right: var(--space-6);
    width: 60px;
    height: 60px;
    background: #25d366;
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
    z-index: var(--z-fixed);
    transition: var(--transition-all);
}

.whatsapp-float:hover {
    background: #128c7e;
    color: var(--white);
    transform: scale(1.1);
    text-decoration: none;
}

.whatsapp-float .tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--gray-900);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-xl);
    font-size: var(--text-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-all);
    margin-right: var(--space-3);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.tooltip-text {
    display: block;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.tooltip-subtext {
    display: block;
    font-size: var(--text-xs);
    color: #25d366;
    margin-top: 2px;
}

.whatsapp-float .tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: var(--white);
}

.whatsapp-float:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Navbar Spacer */
.navbar-spacer {
    height: 80px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}

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

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

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .modern-navbar,
    .modern-footer,
    .back-to-top,
    .whatsapp-float,
    .cookie-notice,
    #preloader {
        display: none !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .navbar-spacer {
        display: none !important;
    }
}

/* Responsive Typography */
@media (min-width: 640px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    h3 {
        font-size: var(--text-3xl);
    }
}

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

    h2 {
        font-size: var(--text-5xl);
    }

    h3 {
        font-size: var(--text-4xl);
    }

    .section {
        padding: var(--space-20) 0;
    }

    .section-sm {
        padding: var(--space-16) 0;
    }

    .section-lg {
        padding: var(--space-24) 0;
    }

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

@media (min-width: 1024px) {
    .cookie-content {
        padding: 0 var(--space-6);
    }

    .cookie-actions {
        margin-left: auto;
    }
}