/* css/main.css */
/* ===== CSS Variables ===== */
:root {
    /* Modern Color Palette - UPDATED */
    --primary-color: #005F73; /* Deep Teal */
    --primary-dark: #004D5C;  /* Darker Teal */
    --primary-light: #0A9396; /* Lighter, vibrant Teal */
    
    --secondary-color: #0A9396; /* Using primary-light for secondary for harmony */
    --secondary-dark: #005F73;   /* Can be primary or primary-dark */
    
    --accent-color: #E9C46A;  /* Muted Gold/Amber */
    
    --danger-color: #EF4444;
    --success-color: #10B981; /* Kept green for general success messages if needed */
    --warning-color: #F59E0B; /* Kept orange for general warning messages */
    --info-color: #3B82F6;
    
    /* Price Color - UPDATED */
    --price-color: var(--gray-700); /* Dark gray for prices for readability */
    
    /* RGB versions for overlays (rgba) - NEW */
    --primary-color-rgb: 0, 95, 115;
    --primary-light-rgb: 10, 147, 150;
    --accent-color-rgb: 233, 196, 106;

    /* 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;
    
    /* Custom Background */
    --bg-primary: #F9FAFB; /* Slightly updated for a very clean base */
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0F2F5; /* Slightly cooler tertiary */
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --font-size-base: 16px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    --spacing-xxxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-xxl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows - Subtler shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 3px 5px -1px rgba(0, 0, 0, 0.07), 0 2px 3px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 12px -3px rgba(0, 0, 0, 0.08), 0 3px 5px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 15px 20px -5px rgba(0, 0, 0, 0.08), 0 8px 8px -5px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out; /* Added ease-in-out for smoother feel */
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    --transition-slower: 500ms ease-in-out;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* Layout */
    --header-height: 80px;
    --container-max-width: 1280px;
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: var(--header-height);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--bg-primary); 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}

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

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

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: var(--container-max-width); /* Using variable */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

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

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent; /* Slightly thinner border */
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark); /* This will be primary-color or primary-dark */
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* ===== Cards ===== */
.card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg); /* Updated shadow */
    transform: translateY(-5px);
}

/* ===== Forms ===== */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--white);
    border: 1px solid var(--gray-300); /* Thinner border */
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15); /* Using RGB var for box shadow */
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%); /* Using theme grays */
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Responsive Grid ===== */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

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

/* ===== WhatsApp Float Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #25d366, #128c7e); /* Standard WhatsApp colors */
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3); /* Softer shadow */
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    text-decoration: none !important; 
}

.whatsapp-float:hover {
    background: linear-gradient(135deg, #128c7e, #25d366);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); /* Softer shadow */
    color: var(--white);
    text-decoration: none !important;
}

.whatsapp-float i {
    text-decoration: none !important;
}

/* Animación de pulso */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: var(--radius-full);
    animation: pulse-whatsapp 2s infinite;
    z-index: -1;
    opacity: 0.7; /* Slightly more visible base */
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(0.95); /* Start smaller */
        opacity: 0.7;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}


/* ===== Responsive Utilities ===== */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .grid-cols-2 { grid-template-columns: 1fr; }
    .grid-cols-3 { grid-template-columns: 1fr; }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .section-padding {
        padding: var(--spacing-xl) 0;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .whatsapp-float::before {
        display: none; 
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .hide-tablet { display: none !important; }
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    .hide-desktop { display: none !important; }
}

/* ===== Print Styles ===== */
@media print {
    .no-print { display: none !important; }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        background-color: var(--white) !important; /* Ensure white background for print */
        color: var(--black) !important; /* Ensure black text for print */
    }
    
    a {
        color: var(--black) !important;
        text-decoration: underline !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }

    .btn, .card, .whatsapp-float {
        border: 1px solid var(--gray-300) !important;
        box-shadow: none !important;
    }
}