/* ========================================================
   RESET Y CONFIGURACIÓN GLOBAL
======================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f5e1;
}

.main-content {
    padding-top: 80px;
}

/* ========================================================
   NAVBAR
======================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    height: 80px;
    line-height: 40px;
}

.navbar .logo {
    display: flex;
    align-items: center;
}

.navbar .logo img {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-links li {
    margin-left: 10px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 16px;
}

.nav-links .btn {
    padding: 6px 12px;
    background-color: #9ccd7f;
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.nav-links .btn:hover {
    background-color: #8db46f;
}

.hamburger {
    display: none !important;
}

/* ========================================================
   HERO SECTION
======================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 80px 20px;
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    position: relative;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(80, 137, 68, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 48px;
    color: #fff;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-content .btn-primary {
    padding: 12px 25px;
    background-color: #9ccd7f;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s;
}

.hero-content .btn-primary:hover {
    background-color: #8db46f;
}

/* ========================================================
   FEATURES SECTION
======================================================== */
.features {
    padding: 60px 20px;
    text-align: center;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 40px;
}

.features-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.feature {
    width: 22%;
    margin: 10px;
    padding: 20px;
    background-color: #eef7e5;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

.feature i {
    font-size: 50px;
    color: #9ccd7f;
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.feature p {
    font-size: 16px;
    color: #666;
}

/* ========================================================
   HOW IT WORKS SECTION
======================================================== */
.how-it-works {
    padding: 60px 20px;
    text-align: center;
    background: url('../images/how-it-works-bg.jpg') no-repeat center center/cover;
    color: #fff;
    position: relative;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(80, 137, 68, 0.7);
    z-index: 1;
}

.how-it-works h2 {
    font-size: 36px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.steps-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.step {
    width: 22%;
    margin: 10px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.3);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #9ccd7f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px auto;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.step p {
    font-size: 16px;
    color: #ddd;
}

/* ========================================================
   TESTIMONIOS
======================================================== */
.testimonials {
    padding: 60px 20px;
    text-align: center;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 40px;
}

.testimonials-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.testimonial {
    width: 30%;
    margin: 10px;
    padding: 20px;
    background-color: #eef7e5;
    border-radius: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

.testimonial img.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.testimonial p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial h4 {
    font-size: 18px;
    color: #333;
}

/* ========================================================
   SECCIÓN COMUNIDAD
======================================================== */
.community {
    padding: 60px 20px;
    text-align: center;
    background-color: #eef7e5;
    max-width: 1200px;
    margin: 0 auto;
}

.community h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.community p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.community-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.community-images img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.community-images img:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

/* ========================================================
   CTA FINAL
======================================================== */
.cta {
    padding: 60px 20px;
    text-align: center;
    background-color: #eef7e5;
    max-width: 1200px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
}

.cta p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.cta .btn-primary {
    padding: 12px 25px;
    background-color: #9ccd7f;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s;
}

.cta .btn-primary:hover {
    background-color: #8db46f;
}

/* ========================================================
   FOOTER
======================================================== */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-left img {
    width: 300px;
    height: auto;
}

.footer-left p {
    margin-top: 10px;
    font-size: 14px;
    color: #ccc;
}

.footer-right ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.footer-right ul li {
    margin-left: 20px;
}

.footer-right ul li a {
    text-decoration: none;
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-right ul li a:hover {
    color: #9ccd7f;
}

.footer-right ul li a.social-icon i {
    font-size: 20px;
}

/* ========================================================
   MEDIA QUERIES (Responsividad Global)
======================================================== */
@media (max-width: 1440px) {
    .navbar .logo img { max-width: 200px; }
}

@media (max-width: 1024px) {
    .navbar .logo img { max-width: 180px; }
    .feature, .step { width: 45%; }
    .testimonial { width: 45%; }
}

@media (max-width: 768px) {
    .navbar .logo img { max-width: 150px; }
    .footer-container { flex-direction: column; text-align: center; }
    .community-images img { width: 150px; height: 150px; }
    .footer-right ul { margin-top: 20px; }
}

@media (max-width: 576px) {
    .feature, .step, .testimonial { width: 100%; }
    .nav-links .btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .navbar .logo img { max-width: 120px; }
}

@media (max-width: 346px) {
    .navbar .logo img { max-width: 100px; }
    .nav-links .btn {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 5px;
    }
    .navbar {
        padding: 10px;
        height: 50px;
    }
}

/* --- ESTILOS PARA EL POP-UP PROMOCIONAL --- */
#promo-popup-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#promo-popup-content {
    background-color: #f0f5e1;
    color: #333;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#promo-popup-content h2 {
    color: #508944;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 15px;
}

#promo-popup-content p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
}

#promo-popup-content .btn-primary {
    display: inline-block;
    background-color: #9ccd7f;
    color: white;
    padding: 12px 25px;
    font-size: 18px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
}

#promo-popup-content .btn-primary:hover {
    background-color: #8db46f;
}

#close-popup-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#close-popup-btn:hover {
    color: #333;
}

@media (max-width: 600px) {
    #promo-popup-content {
        padding: 25px 20px;
    }
    #promo-popup-content h2 {
        font-size: 22px;
    }
    #promo-popup-content p {
        font-size: 16px;
    }
    #promo-popup-content .btn-primary {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* ========================================================
   NUEVOS ESTILOS: VETERINARIOS QUE NOS AVALAN
======================================================== */
.endorsements {
    padding: 60px 20px;
    text-align: center;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

.endorsements h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 40px;
}

.endorsements-carousel {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 20px;
    margin: 0 -20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #9ccd7f #e0e0e0;
}

.endorsements-carousel::-webkit-scrollbar {
    height: 8px;
}

.endorsements-carousel::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.endorsements-carousel::-webkit-scrollbar-thumb {
    background-color: #9ccd7f;
    border-radius: 10px;
}

.endorsement-item {
    flex: 0 0 280px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.endorsement-video {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: block;
    background-color: #000;
}

.endorsement-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    margin-top: 15px;
    margin-bottom: 5px;
}

.endorsement-item h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.endorsement-item p {
    font-size: 0.95rem;
    color: #666;
    margin: 0 15px 15px 15px;
}

.social-icon-link i {
    font-size: 1.6rem;
    color: #888;
    transition: color 0.3s ease;
}

.social-icon-link:hover i {
    color: #E1306C;
}

/* Media query para móviles en la nueva sección */
@media (max-width: 768px) {
    .endorsements h2 {
        font-size: 2rem;
    }
    .endorsement-item {
        flex-basis: 75%;
        max-width: 280px;
    }
    .endorsements-carousel {
       scroll-snap-type: x mandatory; 
    }
    .endorsement-item {
       scroll-snap-align: center;
    }
}

/* ========================================================
   SECCIÓN PWA - INSTALAR APP
======================================================== */
.pwa-install {
    padding: 60px 20px;
    text-align: center;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

.pwa-container {
    max-width: 800px;
    margin: 0 auto;
}

.pwa-install h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pwa-install h2 i {
    color: #9ccd7f;
    font-size: 36px;
}

.pwa-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.pwa-instructions {
    display: none;
}

.pwa-card {
    background-color: #eef7e5;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pwa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

.pwa-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #9ccd7f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    transition: background-color 0.3s;
}

.pwa-icon-wrapper i {
    font-size: 40px;
    color: #fff;
}

.pwa-card h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.pwa-card > p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.pwa-steps {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding-left: 20px;
}

.pwa-steps li {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

.pwa-steps li strong {
    color: #508944;
    font-weight: 600;
}

.pwa-install-btn {
    padding: 14px 30px;
    background-color: #9ccd7f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.pwa-install-btn:hover {
    background-color: #8db46f;
    transform: translateY(-2px);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

.pwa-install-btn i {
    font-size: 18px;
}

.pwa-manual-instructions {
    font-size: 15px;
    color: #666;
    margin-top: 20px;
    line-height: 1.6;
    font-style: italic;
}

.pwa-hint {
    display: none;
    margin-top: 25px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    border-left: 4px solid #9ccd7f;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pwa-hint i {
    color: #9ccd7f;
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.pwa-hint p {
    display: inline-block;
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.pwa-hint p strong {
    color: #508944;
    font-weight: 600;
}

.pwa-hint ul {
    text-align: left;
    margin-top: 10px;
    padding-left: 20px;
    list-style-type: disc;
}

.pwa-hint ul li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.pwa-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pwa-actions .pwa-install-btn {
    margin: 0;
}

.pwa-fallback {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    line-height: 1.6;
    font-style: italic;
}

.pwa-fallback strong {
    color: #508944;
    font-weight: 600;
}

.pwa-install-intro {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.pwa-ios-steps {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-step-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.pwa-step-number {
    width: 35px;
    height: 35px;
    background-color: #9ccd7f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.pwa-step-content {
    flex: 1;
}

.pwa-step-content p {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.6;
}

.pwa-step-content p strong {
    color: #508944;
    font-weight: 600;
}

.pwa-step-hint {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    line-height: 1.5;
}

.pwa-ios-instructions {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.pwa-ios-step {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
    padding-left: 25px;
    position: relative;
}

.pwa-ios-step i {
    color: #9ccd7f;
    margin: 0 5px;
}

.pwa-ios-step strong {
    color: #508944;
    font-weight: 600;
}

/* Toast de actualización de SW */
.sw-update-toast {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.sw-update-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sw-update-content span {
    font-size: 15px;
}

.sw-update-btn {
    padding: 8px 16px;
    background-color: #9ccd7f;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sw-update-btn:hover {
    background-color: #8db46f;
}

/* Media queries para la sección PWA */
@media (max-width: 768px) {
    .pwa-install {
        padding: 40px 15px;
    }
    
    .pwa-install h2 {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }
    
    .pwa-install h2 i {
        font-size: 28px;
    }
    
    .pwa-subtitle {
        font-size: 16px;
    }
    
    .pwa-card {
        padding: 30px 20px;
    }
    
    .pwa-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .pwa-icon-wrapper i {
        font-size: 35px;
    }
    
    .pwa-card h3 {
        font-size: 24px;
    }
    
    .pwa-steps {
        padding-left: 15px;
    }
    
    .pwa-steps li {
        font-size: 15px;
    }
    
    .pwa-install-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .pwa-hint {
        padding: 15px;
    }
    
    .pwa-hint p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pwa-install h2 {
        font-size: 24px;
    }
    
    .pwa-card {
        padding: 25px 15px;
    }
    
    .pwa-card h3 {
        font-size: 20px;
    }
    
    .pwa-steps li {
        font-size: 14px;
    }
    
    .pwa-install-btn {
        padding: 10px 20px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .pwa-step-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .pwa-step-number {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .pwa-step-content p {
        font-size: 15px;
    }
    
    .pwa-step-hint {
        font-size: 13px;
    }
}