/* CSS Custom Design system for Funeraria Galdames */

:root {
    --primary: #339999;      /* Institutional Teal */
    --secondary: #4db8b8;    /* Lighter Teal */
    --primary-light: #5cb8b8;
    --primary-dark: #1f5c5c;
    --accent: #c5a059;       /* Elegant Gold */
    --accent-dark: #ab863f;
    --dark: #122222;         /* Dark Slate Teal */
    --light: #f5fbfb;        /* Pale Teal-White */
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 77, 77, 0.05);
    --shadow-medium: 0 15px 40px rgba(0, 77, 77, 0.1);
    --shadow-hard: 0 20px 50px rgba(0, 77, 77, 0.15);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --font-title: "Bell MT", "Playfair Display", "Georgia", "Times New Roman", serif;
    --font-body: "Plus Jakarta Sans", "Inter", -apple-system, sans-serif;
    --transition-smooth: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.2s ease;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-quick);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Top Info Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bar-item i {
    color: var(--accent);
    margin-right: 6px;
}

.bar-item a:hover {
    color: var(--accent);
}

/* Header & Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 77, 77, 0.04);
    border-bottom: 1px solid rgba(0, 102, 102, 0.06);
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 102, 102, 0.1));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 2px;
    line-height: 1.1;
}

.brand-subtext {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-dark);
    font-weight: 600;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-dark);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-quick);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.btn-nav {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 15px rgba(0, 102, 102, 0.15);
}

.btn-nav:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 102, 0.25);
}

.btn-nav::after {
    display: none !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 2.5px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    transition: var(--transition-quick);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    padding: 100px 0;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge-hero {
    display: inline-block;
    background-color: rgba(197, 160, 89, 0.18);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    cursor: pointer;
    gap: 10px;
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.45);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.hero-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.hero-divider .shape-fill {
    fill: var(--light);
}

/* Stat / Counters Section */
.stats-section {
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 102, 102, 0.03);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(0, 102, 102, 0.08);
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition-smooth);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary);
}

.stat-number-wrapper {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.1;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.stat-desc {
    font-size: 0.85rem;
    color: #608080;
}

/* History / Nosotros Section */
.history-section {
    padding: 100px 0;
    background-color: var(--white);
}

.history-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 70px;
}

.history-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: overflow 0.3s ease;
    z-index: 1;
}
.history-image-wrapper:hover {
    overflow: visible;
    z-index: 10;
}

.history-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: var(--transition-smooth);
}



.image-overlay-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background: rgba(0, 51, 51, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 20px 25px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.badge-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 4px;
}

.badge-year {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 600;
}

.history-text {
    padding-right: 20px;
}

.section-subtitle {
    display: inline-block;
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.history-text h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 28px;
}

.history-text p {
    font-size: 1.05rem;
    color: #4a6666;
    margin-bottom: 24px;
}

.history-text p strong {
    color: var(--primary-dark);
}

/* Services section */
.services-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px auto;
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.05rem;
    color: #557777;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.service-feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 102, 102, 0.02);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.service-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(0, 102, 102, 0.06);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 24px;
    background-color: rgba(0, 153, 153, 0.06);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.service-feature-card:hover .feature-icon {
    background-color: var(--primary);
    color: var(--white);
}

.service-feature-card h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 14px;
}

.service-feature-card p {
    font-size: 0.92rem;
    color: #557777;
    line-height: 1.6;
}

.included-banner {
    background-color: var(--primary-dark);
    color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 35px 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: var(--shadow-medium);
}

.banner-icon {
    font-size: 2.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.banner-content h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--white);
}

.banner-content p {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* Plans section */
.plans-section {
    padding: 100px 0;
    background-color: #ebf5f5;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

.plan-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden; /* Default overflow hidden */
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 102, 102, 0.04);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}
.plan-card:hover {
    overflow: visible; /* Show overflow on hover so image pops out */
    z-index: 10;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hard);
    border-color: rgba(0, 102, 102, 0.1);
}

.plan-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    transition: overflow 0.3s ease;
}
.plan-card:hover .plan-image-wrapper {
    overflow: visible;
}

.plan-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s ease, border-radius 0.8s ease;
}



.plan-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-badge {
    background-color: var(--accent);
    color: var(--white);
}

.plan-card-header {
    padding: 30px 25px 20px 25px;
    text-align: center;
    border-bottom: 1px solid #ebf5f5;
}

.plan-card-header h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.plan-price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--primary);
}

.plan-price .currency {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 6px;
    margin-right: 2px;
}

.plan-price .amount {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.plan-subtitle {
    font-size: 0.85rem;
    color: #608080;
    font-weight: 500;
}

.plan-features {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.88rem;
    color: #4a6666;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.plan-features li i {
    color: var(--secondary);
    margin-top: 3px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gold-star {
    color: var(--accent) !important;
}

.plan-features li.section-divider-li {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #cde3e3;
    display: block;
    text-align: center;
}

.plan-card-action {
    padding: 0 25px 30px 25px;
}

.btn-card {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 15px rgba(0, 102, 102, 0.1);
}

.btn-card:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 102, 0.2);
}

/* Featured Premium Plan Styling */
.plan-featured {
    border: 2px solid var(--accent);
    transform: scale(1.02);
}

.plan-featured:hover {
    transform: translateY(-10px) scale(1.02);
}

.btn-featured-card {
    background-color: var(--accent);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
}

.btn-featured-card:hover {
    background-color: var(--accent-dark);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

.plans-disclaimer {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500; /* semi-bold */
    color: var(--primary-dark);
    margin-top: 45px;
    font-style: normal;
}

/* Ubicación y Contacto Section */
.contact-section {
    padding: 100px 0;
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 70px;
    align-items: center;
}

.contact-info h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-info > p {
    font-size: 1.05rem;
    color: #557777;
    margin-bottom: 40px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.detail-item {
    display: flex;
    gap: 20px;
}

.detail-icon {
    font-size: 1.5rem;
    color: var(--accent);
    background-color: rgba(197, 160, 89, 0.08);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.detail-text h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.detail-text p {
    font-size: 0.95rem;
    color: #557777;
    line-height: 1.5;
}

.detail-text a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Map Card */
.map-card-wrapper {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 102, 102, 0.05);
    height: 480px;
}

.map-container {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

/* Footer Section */
.main-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 70px 0 40px 0;
    border-top: 3px solid var(--accent);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    height: 70px;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.15));
}

.footer-brand h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 4px;
}

.footer-brand p {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
}

.footer-links-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    width: 100%;
    max-width: 700px;
}

.footer-links-group a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-links-group a:hover {
    color: var(--accent);
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Floating WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition-smooth);
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.55);
}

.whatsapp-badge {
    position: absolute;
    right: 70px;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.whatsapp-btn:hover .whatsapp-badge {
    opacity: 1;
    transform: translateX(0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.96); /* Entrada de escala sutil para efecto cinematográfico */
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform; /* Aceleración por GPU */
}

.fade-in-up-scroll.appear {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Media Queries (Responsive Design) */

/* Desktop & Large Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .history-img {
        height: 380px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .plan-featured {
        transform: none;
    }
    
    .plan-featured:hover {
        transform: translateY(-10px);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .map-card-wrapper {
        height: 380px;
    }
}

/* Medium Tablets & Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .nav-container {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .brand-name {
        font-size: 1.35rem;
    }
    
    .brand-subtext {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }
    
    .nav-logo {
        height: 45px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 66px; /* Dynamic alignment based on smaller header */
        left: -100%;
        width: 100%;
        height: calc(100vh - 66px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        padding: 40px 24px;
        transition: var(--transition-smooth);
        box-shadow: 0 15px 30px rgba(0, 77, 77, 0.08);
        border-top: 1px solid rgba(0, 102, 102, 0.05);
        z-index: 998;
    }
    
    .nav-links.open {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.15rem;
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }
    
    .btn-nav {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .mobile-menu-btn.open .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-btn.open .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.open .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Spacing adjustments for cleaner look on small screens */
    .hero, 
    .history-section, 
    .services-section, 
    .plans-section, 
    .contact-section {
        padding: 60px 0;
    }
    
    .hero {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.1rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        padding: 14px 28px;
    }
    
    .history-text h2, 
    .section-header h2, 
    .contact-info h2 {
        font-size: 1.85rem;
        margin-bottom: 16px;
    }
    
    .history-img {
        height: 280px;
    }
    
    .image-overlay-badge {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 15px;
    }
    
    .badge-year {
        font-size: 1.2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-feature-card {
        padding: 30px 20px;
    }
    
    .included-banner {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }
    
    .banner-icon {
        font-size: 2.2rem;
    }
    
    /* Plans spacing and centering on mobile */
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .plan-card {
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }
    
    .plan-featured {
        transform: scale(1);
    }
    
    .plan-featured:hover {
        transform: translateY(-8px);
    }
    
    .contact-details-list {
        gap: 25px;
    }
    
    .detail-item {
        gap: 15px;
    }
    
    .detail-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .map-card-wrapper {
        height: 320px;
        padding: 10px;
    }
    
    .whatsapp-badge {
        display: none;
    }
    
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 1.8rem;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    }
}

/* Small Cellphones (max-width: 480px) */
@media (max-width: 480px) {
    .brand-name {
        font-size: 1.2rem;
        letter-spacing: 1.5px;
    }
    
    .brand-subtext {
        font-size: 0.55rem;
        letter-spacing: 1.5px;
    }
    
    .nav-logo {
        height: 40px;
        gap: 10px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 25px 20px;
    }
    
    .stat-number-wrapper {
        font-size: 2.2rem;
    }
    
    .history-text h2, 
    .section-header h2, 
    .contact-info h2 {
        font-size: 1.6rem;
    }
    
    .plan-card-header h3 {
        font-size: 1.4rem;
    }
    
    .plan-price .amount {
        font-size: 1.9rem;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-brand {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links-group {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
}

/* ==========================================
   Pantalla de Carga (Loader Section)
   ========================================== */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 51, 0.93); /* Dark teal overlay matching our theme */
    backdrop-filter: blur(12px); /* Glassmorphism blur */
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Highest priority */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
                visibility 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.loader-logo {
    height: 100px;
    max-width: 120px;
    width: 100%;
    object-fit: contain;
    animation: loaderPulse 2s infinite ease-in-out;
}

.loader-pulse {
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.loader-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loaderProgress 1.5s infinite linear;
}

@keyframes loaderPulse {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes loaderProgress {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==========================================
   Nuevas Adiciones de Diseño y Dinamismo
   ========================================== */

/* Zoom de Imágenes (Hover en Desktop) */


@media (hover: hover) {

}

/* History Carousel Fade styling */
.history-image-wrapper.carousel-fade {
    position: relative;
    height: 480px;
    width: 100%;
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}
.carousel-slide .history-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Testimonials / Valoraciones Section */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--white);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.testimonial-card {
    background-color: var(--light);
    padding: 40px 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(51, 153, 153, 0.05);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(51, 153, 153, 0.15);
}
.testimonial-card .stars {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.testimonial-quote {
    font-size: 0.95rem;
    color: #4a6666;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}
.testimonial-author {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}
.testimonial-date {
    font-size: 0.8rem;
    color: #709090;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer layout update with large responsive logo */
.footer-grid-container {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    text-align: left;
}
.footer-left-logo {
    flex-shrink: 0;
}
.footer-logo-large {
    height: 160px;
    width: auto;
    opacity: 0.35; /* Translucido */
    transition: var(--transition-smooth);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}
.footer-logo-large:hover {
    opacity: 0.6;
    transform: scale(1.03);
}
.footer-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.footer-brand h3 {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--white);
    letter-spacing: 3px;
    font-weight: 700;
}
.footer-brand-subtext {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    font-weight: 600;
}
.footer-links-group {
    width: 100%;
    display: flex;
    justify-content: center; /* Centrado */
    gap: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px 0;
    margin: 10px 0;
    flex-wrap: wrap;
}
.footer-copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .footer-grid-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    .footer-logo-large {
        height: 140px;
    }
    .footer-main-content {
        align-items: center;
    }
    .footer-links-group {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }
    .footer-copy {
        align-self: center;
        text-align: center;
    }
}

.stat-number-text {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.1;
}
/* ==========================================
   Efecto Lupa Pop-out Avanzado e Instantáneo
   ========================================== */

.plan-card-img, .history-img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s ease, border-radius 0.8s ease !important;
}

@media (hover: hover) {
    .plan-card:hover .plan-card-img {
        transform: scale(1.25);
        box-shadow: 0 15px 35px rgba(0, 51, 51, 0.25);
        border-radius: var(--border-radius-md) !important;
    }
    .history-image-wrapper:hover .history-img {
        transform: scale(1.25);
        box-shadow: 0 20px 45px rgba(0, 51, 51, 0.3);
    }
}

@media (max-width: 768px) {
    /* Transición ultra rápida para amortiguar el movimiento del dedo y dar fluidez */
    .plan-card-img, .history-img {
        transition: transform 0.15s ease-out !important;
    }
    /* Forzar ocultamiento del desborde para evitar scroll horizontal en celulares */
    .plan-card, .plan-image-wrapper, .history-image-wrapper {
        overflow: hidden !important;
    }
}

/* ==========================================
   Ajustes Críticos de Responsividad de Imágenes
   ========================================== */

@media (max-width: 768px) {
    /* Corregir bug de background-attachment: fixed en móviles (Hero) */
    .hero {
        background-attachment: scroll !important;
        background-position: center center !important;
        min-height: 55vh !important;
        padding: 60px 0 !important;
    }
    
    /* Evitar que las fotos de la historia se recorten/corten verticalmente */
    .history-image-wrapper.carousel-fade {
        height: auto !important;
        aspect-ratio: 3 / 2 !important; /* Proporciones horizontales perfectas */
    }
    .carousel-slide .history-img {
        height: 100% !important;
    }
    
    /* Evitar que las fotos de los planes se recorten */
    .plan-image-wrapper {
        height: auto !important;
        aspect-ratio: 16 / 9 !important; /* Aspect ratio estándar horizontal */
    }
    .plan-card-img {
        height: 100% !important;
    }
}

/* ==========================================
   Responsividad de Testimonios / Valoraciones
   ========================================== */

@media (max-width: 991px) {
    .testimonials-grid {
        grid-template-columns: 1fr !important; /* 1 columna en tablets y celulares */
        gap: 25px !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 576px) {
    .testimonials-section {
        padding: 60px 0 !important;
    }
    .testimonial-card {
        padding: 30px 20px !important; /* Menor padding para celulares pequeños */
    }
    .testimonial-quote {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }
}

/* ==========================================
   Animaciones Creativas, Fluidas y de Confianza
   ========================================== */

/* Efecto de Onda/Secuencia (Staggered Animation Delay) al hacer Scroll */
.stats-grid .stat-card:nth-child(1) { transition-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { transition-delay: 0.2s; }
.stats-grid .stat-card:nth-child(3) { transition-delay: 0.35s; }
.stats-grid .stat-card:nth-child(4) { transition-delay: 0.5s; }

.services-grid .service-feature-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-feature-card:nth-child(2) { transition-delay: 0.2s; }
.services-grid .service-feature-card:nth-child(3) { transition-delay: 0.35s; }
.services-grid .service-feature-card:nth-child(4) { transition-delay: 0.5s; }

.plans-grid .plan-card:nth-child(1) { transition-delay: 0.05s; }
.plans-grid .plan-card:nth-child(2) { transition-delay: 0.2s; }
.plans-grid .plan-card:nth-child(3) { transition-delay: 0.35s; }
.plans-grid .plan-card:nth-child(4) { transition-delay: 0.5s; }

.testimonials-grid .testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonials-grid .testimonial-card:nth-child(2) { transition-delay: 0.2s; }
.testimonials-grid .testimonial-card:nth-child(3) { transition-delay: 0.35s; }

/* En móviles desactivamos el delay escalonado para evitar desfase en scroll rápido */
@media (max-width: 768px) {
    .stat-card,
    .service-feature-card,
    .plan-card,
    .testimonial-card {
        transition-delay: 0s !important;
    }
}

/* Pulsación Suave de WhatsApp (Confianza y Presencia Activa 24/7) */
@keyframes whatsappSoftPulse {
    0% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-btn {
    animation: whatsappSoftPulse 3s infinite cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.whatsapp-btn:hover {
    animation: none !important; /* Desactivar pulsación en hover para priorizar la escala */
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.55) !important;
}
