/* assets/css/style.css - Estilos Base Corregidos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables base que serán sobrescritas por dynamic-theme.css.php */
:root {
    --border-radius: 8px;
    --border-radius-lg: 15px;
    --transition: all 0.3s ease;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Variables de color por defecto - serán sobrescritas por header.php */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    /* Los colores se aplicarán desde dynamic-theme.css.php */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======================================
   HEADER Y NAVEGACIÓN BASE
   ====================================== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: block;
    color: #333;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0,123,255,0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* ======================================
   HERO Y PAGE HEADERS
   ====================================== */
.hero {
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-description p {
    margin-bottom: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.page-header {
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ======================================
   BOTONES
   ====================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ======================================
   SECCIONES PRINCIPALES
   ====================================== */
.preview-services,
.preview-gallery,
.services-section,
.gallery-section,
.contact-section,
.about-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ======================================
   SERVICIOS
   ====================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.service-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-content {
    padding: 2rem;
}

.service-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-content p {
    line-height: 1.6;
}

.service-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-item {
    display: flex;
    gap: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-image {
    flex: 0 0 300px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-details {
    flex: 1;
    padding: 2rem;
}

.service-details h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.services-intro {
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    text-align: center;
}

.services-intro h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.services-intro p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.services-intro ul {
    text-align: left;
    max-width: 600px;
    margin: 1.5rem auto;
}

.services-intro li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ======================================
   GALERÍA
   ====================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item,
.gallery-item-full {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: var(--transition);
    aspect-ratio: 1;
}

.gallery-item-full {
    border-radius: var(--border-radius-lg);
}

.gallery-item:hover,
.gallery-item-full:hover {
    transform: scale(1.02);
}

.gallery-item img,
.gallery-item-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img,
.gallery-item-full:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay,
.gallery-item-full:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .overlay-content,
.gallery-item-full:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.overlay-content h4 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-counter {
    text-align: center;
    font-style: italic;
}

/* ======================================
   FORMULARIOS
   ====================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form,
.contact-info-section {
    padding: 2rem;
    border-radius: var(--border-radius);
}

.contact-form {
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
}

.contact-details .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-item i {
    font-size: 1.2rem;
    width: 20px;
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.contact-item p {
    margin: 0;
}

.contact-item a {
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.business-hours {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid;
}

.business-hours h3 {
    margin-bottom: 1rem;
}

.hours-content {
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    line-height: 1.6;
}

.business-hours ul {
    list-style: none;
    padding: 0;
}

.business-hours li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid;
}

.business-hours li:last-child {
    border-bottom: none;
}

.business-hours span {
    font-weight: 500;
}

.contact-cta {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.contact-cta h3 {
    margin-bottom: 0.5rem;
}

.contact-cta p {
    margin: 0;
}

/* ======================================
   ALERTAS
   ====================================== */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid;
}

/* ======================================
   ABOUT (NOSOTROS)
   ====================================== */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    padding: 3rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.about-text h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-text h3 {
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
}

.about-text li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: bold;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.highlight-item {
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-5px);
}

.highlight-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
}

.highlight-item h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.highlight-item p {
    line-height: 1.6;
}

/* ======================================
   CTA SECTION
   ====================================== */
.cta-section {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta-content p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ======================================
   NO CONTENT
   ====================================== */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
}

.no-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-content h3 {
    margin-bottom: 1rem;
}

.no-content-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 400px;
    margin: 0 auto;
}

.no-content-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-content-card h3 {
    margin-bottom: 1rem;
}

.no-content-card p {
    line-height: 1.6;
}

/* ======================================
   FOOTER
   ====================================== */
.footer {
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-info a {
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.footer-bottom-links a {
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    text-decoration: underline;
}

.separator {
    opacity: 0.6;
}

.footer-logo {
    max-height: 50px;
    margin-bottom: 1rem;
}

.business-hours {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ======================================
   LOGO Y BRANDING
   ====================================== */
.site-logo {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    transition: var(--transition);
}

.logo-text:hover {
    transform: scale(1.02);
}

/* ======================================
   UTILITY CLASSES
   ====================================== */
.text-center { 
    text-align: center; 
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        flex-direction: column;
    }
    
    .service-image {
        flex: none;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .gallery-grid-full {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .preview-services,
    .preview-gallery,
    .services-section,
    .gallery-section,
    .contact-section,
    .about-section {
        padding: 2rem 0;
    }
    
    .about-text,
    .services-intro,
    .contact-form,
    .contact-info-section {
        padding: 1.5rem;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .highlight-item {
        padding: 1.5rem;
    }
    
    .gallery-grid,
    .gallery-grid-full {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .about-text h2 {
        font-size: 1.5rem;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .site-logo {
        max-height: 35px;
    }
}

/* ===== WHATSAPP STYLES ===== */

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0;
    animation: whatsapp-bounce-in 0.6s ease-out 1s forwards;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #25d366;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: scale(1);
    max-width: 60px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background: #1da851;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    max-width: 250px;
    text-decoration: none;
}

.whatsapp-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.whatsapp-btn:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

.whatsapp-btn i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.whatsapp-text {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.whatsapp-btn:hover .whatsapp-text {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(37, 211, 102, 0.3);
    border-radius: 50px;
    animation: whatsapp-pulse 2s infinite;
    pointer-events: none;
}

/* Botones inline de WhatsApp */
.btn-whatsapp {
    background: #25d366;
    border: 2px solid #25d366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1da851;
    border-color: #1da851;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-whatsapp i {
    font-size: 1.2rem;
}

/* Variantes del botón WhatsApp */
.btn-whatsapp-outline {
    background: transparent;
    border: 2px solid #25d366;
    color: #25d366;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-whatsapp-outline:hover {
    background: #25d366;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.btn-whatsapp-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-whatsapp-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Animaciones */
@keyframes whatsapp-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

@keyframes whatsapp-bounce-in {
    0% {
        transform: translateY(100px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes whatsapp-subtle-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-3px) scale(1.02);
    }
    60% {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Animación sutil de rebote cada cierto tiempo */
.whatsapp-btn {
    animation: whatsapp-subtle-bounce 4s infinite ease-in-out;
}

.whatsapp-btn:hover {
    animation: none; /* Detener animación al hacer hover */
}

/* Responsive design */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        padding: 0.875rem 1rem;
        max-width: 55px;
    }
    
    .whatsapp-btn:hover {
        max-width: 200px;
    }
    
    .whatsapp-btn i {
        font-size: 1.3rem;
    }
    
    .whatsapp-text {
        font-size: 0.8rem;
    }
    
    .btn-whatsapp,
    .btn-whatsapp-outline {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 10px;
        right: 10px;
    }
    
    .whatsapp-btn {
        padding: 0.75rem 0.875rem;
        max-width: 50px;
    }
    
    .whatsapp-btn:hover {
        max-width: 180px;
    }
    
    .btn-whatsapp,
    .btn-whatsapp-outline {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-whatsapp i,
    .btn-whatsapp-outline i {
        font-size: 1.1rem;
    }
}

/* Tema oscuro */
[data-theme="dark"] .whatsapp-btn,
.dark-theme .whatsapp-btn,
.dark-auto .whatsapp-btn {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
}

[data-theme="dark"] .whatsapp-btn:hover,
.dark-theme .whatsapp-btn:hover,
.dark-auto .whatsapp-btn:hover {
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7);
}

[data-theme="dark"] .btn-whatsapp-outline,
.dark-theme .btn-whatsapp-outline,
.dark-auto .btn-whatsapp-outline {
    border-color: #25d366;
    color: #25d366;
}

/* Evitar conflictos con otros elementos */
.whatsapp-float {
    pointer-events: auto;
}

.whatsapp-float * {
    pointer-events: auto;
}

/* Estados de carga y error */
.whatsapp-loading {
    opacity: 0.6;
    pointer-events: none;
}

.whatsapp-error {
    background: #dc3545;
    border-color: #dc3545;
}

.whatsapp-error:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Integración con página de contacto */
.contact-whatsapp {
    background: #e8f5e8;
    border: 1px solid #25d366;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.contact-whatsapp h3 {
    color: #25d366;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-whatsapp p {
    margin: 0 0 1rem 0;
    color: #155724;
}

/* Indicador de disponibilidad */
.whatsapp-status {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background: #28a745;
    border: 2px solid white;
    border-radius: 50%;
    animation: whatsapp-status-pulse 2s infinite;
}

@keyframes whatsapp-status-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Tooltip personalizado para WhatsApp */
.whatsapp-tooltip {
    position: relative;
}

.whatsapp-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whatsapp-tooltip:hover::before,
.whatsapp-tooltip:hover::after {
    opacity: 1;
}

/* ===== FIN WHATSAPP STYLES ===== */