/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background: #f7fafc;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-hover: 0 15px 35px rgba(31, 38, 135, 0.5);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    --gradient-vibrant: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Animaciones adicionales para personalidad */
@keyframes floatGentle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 30px rgba(240, 147, 251, 0.8); }
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glass Morphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.logo-img {
    height: 45px;
    width: 45px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-menu {
    display: flex;
}

.nav-menu-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.language-btn.active {
    background: var(--gradient);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(102, 126, 234, 0.7), rgba(118, 75, 162, 0.7)), url('assets/farmacia.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 20%;
    animation-delay: 1s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 70%;
    left: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}


.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-main-logo {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20%;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    display: block;
}

.hero-main-logo:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.4));
}

.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-badge {
    position: absolute;
    bottom: -20px;
    left: 30%;
    transform: translateX(-50%);
    background: var(--gradient-vibrant);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite, glow 3s ease-in-out infinite;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badge i {
    animation: floatGentle 2s ease-in-out infinite;
}

.hero-features {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.feature-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    animation: glow 2s ease-in-out infinite;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
}

/* Scroll Arrow */
.scroll-arrow {
    margin-top: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-arrow i {
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
}

.scroll-arrow:hover i {
    color: var(--secondary-color);
    transform: scale(1.2);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Hero scroll arrow */
.hero .scroll-arrow {
    position: absolute;
    bottom: -7rem;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    width: 100%;
    text-align: center;
}

.hero .scroll-arrow i {
    font-size: 1.8rem;
    color: white;
    animation: bounce 2s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .scroll-arrow:hover i {
    color: var(--accent-color);
    transform: scale(1.2);
}

/* Secondary Header */
.secondary-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem 0;
    text-align: center;
}

.secondary-header .section-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.secondary-header .section-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.secondary-header .scroll-arrow i {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-vibrant);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.service-card .service-content {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    padding: 2rem;
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(102, 126, 234, 0.3);
}

.service-card:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
    transition: transform 0.6s ease;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    animation: floatGentle 3s ease-in-out infinite;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover .feature-tag {
    background: var(--gradient);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Service Card Colors */
.service-card-blue {
    border-left: 4px solid #3b82f6;
}

.service-card-blue .service-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.service-card-blue .feature-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.service-card-green {
    border-left: 4px solid #10b981;
}

.service-card-green .service-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.service-card-green .feature-tag {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.service-card-red {
    border-left: 4px solid #ef4444;
}

.service-card-red .service-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.service-card-red .feature-tag {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.service-card-yellow {
    border-left: 4px solid #f59e0b;
}

.service-card-yellow .service-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.service-card-yellow .feature-tag {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.service-card-purple {
    border-left: 4px solid #8b5cf6;
}

.service-card-purple .service-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.service-card-purple .feature-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.service-card-orange {
    border-left: 4px solid #f97316;
}

.service-card-orange .service-icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.service-card-orange .feature-tag {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* News Section */
.news {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.news-image i {
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.news-content {
    padding: 2rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.news-date {
    color: var(--text-muted);
    font-weight: 500;
}

.news-category {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.news-excerpt h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.news-excerpt p {
    margin: 0.5rem 0;
}

.news-excerpt ul, .news-excerpt ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.news-excerpt li {
    margin: 0.25rem 0;
}

.news-excerpt strong {
    font-weight: 600;
}

.news-excerpt em {
    font-style: italic;
}

.news-excerpt u {
    text-decoration: underline;
}

/* FAQ Section */
.faq {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(102, 126, 234, 0.1);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Downloadables Section */
.downloadables {
    background: var(--white);
}

.downloadables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.downloadable-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.downloadable-card .downloadable-content {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    padding: 2rem;
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

.downloadable-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(102, 126, 234, 0.3);
}

.downloadable-icon {
    width: 80px;
    height: 80px;
    margin: 1.5rem auto 1.5rem;
    background: var(--gradient-vibrant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.downloadable-card:hover .downloadable-icon {
    transform: scale(1.1) rotate(-10deg);
    animation: glow 2s ease-in-out infinite;
}

.downloadable-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.downloadable-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-vibrant);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6), 0 0 20px rgba(240, 147, 251, 0.4);
}

/* News Section */
.news {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    width: 100%;
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.news-image.has-custom-image {
    background: none;
    overflow: hidden;
}

.news-image.has-custom-image::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background-image: inherit;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(20px);
    transform: scale(1.5);
    z-index: 1;
}

.news-image.has-custom-image .news-image-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-image.has-custom-image .news-image-main {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.news-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Delivery Form Section */
.delivery-form {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.delivery-content {
    display: block;
}

.delivery-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.delivery-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.delivery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.delivery-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.delivery-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.delivery-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.delivery-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 3rem auto 0;
}

.delivery-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.whatsapp-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.whatsapp-link:hover::before {
    left: 100%;
}

.whatsapp-link:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #0e6f63 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7), 0 0 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-link i {
    font-size: 1.2rem;
}

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

/* Contact Section */
.contact {
    background: var(--white);
}

.contact-content {
    display: block;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card p {
    color: var(--text-secondary);
}

.contact-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 3rem auto 0;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
}

/* Location Section */
.location {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.location-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.location-card .location-content {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    padding: 2rem;
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.location-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.location-map-card {
    padding: 0;
    overflow: hidden;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    flex-direction: initial;
    justify-content: initial;
}

.location-map-card iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 20px 20px 0 0;
}

.location-map-info {
    padding: 1.5rem;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.location-map-info h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.location-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.location-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.location-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.detail-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.detail-item div {
    flex: 1;
}

.detail-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: var(--shadow);
    max-width: 250px;
}

.map-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.map-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.map-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.map-info li i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

/* Testimonials Section */
.testimonials {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.stars i {
    color: #fbbf24;
    font-size: 1.1rem;
    animation: starTwinkle 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.stars i:nth-child(2) { animation-delay: 0.2s; }
.stars i:nth-child(3) { animation-delay: 0.4s; }
.stars i:nth-child(4) { animation-delay: 0.6s; }
.stars i:nth-child(5) { animation-delay: 0.8s; }

@keyframes starTwinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.testimonial-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.author-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.author-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Team Section */
.team {
    background: var(--white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-card {
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.team-card .team-info {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), 0 0 40px rgba(102, 126, 234, 0.4);
}

.team-card:hover .team-info {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 1));
}

.team-card-1 {
    background-image: url('assets/1.jpg');
}

.team-card-2 {
    background-image: url('assets/2.jpg');
}

.team-card-3 {
    background-image: url('assets/juana.png');
}

/* Service Card Background Images */
.service-card-1 {
    background-image: url('assets/dispensación_medicamentos.jpg');
}

.service-card-2 {
    background-image: url('assets/consultas_farmacéuticas.jpg');
}

.service-card-3 {
    background-image: url('assets/control_parámetros.jpg');
}

.service-card-4 {
    background-image: url('assets/farmacia_pediátrica.png');
}

.service-card-5 {
    background-image: url('assets/dermocosmética.webp');
}

.service-card-6 {
    background-image: url('assets/servicio_domicilio.jpg');
}

/* Location Card Background Images */
.location-card-1 {
    background-image: url('assets/parking.jpg');
}

.location-card-2 {
    background-image: url('assets/transporte_publico.webp');
}

/* Downloadable Card Background Images */
.downloadable-card-1 {
    background-image: url('assets/medicamentos_pediátricos.jpeg');
}

.downloadable-card-2 {
    background-image: url('assets/cuidado_cardiovascular.png');
}

.downloadable-card-3 {
    background-image: url('assets/calendario_vacunación.jpg');
}

.team-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.cert-badge {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Certifications Section */
.certifications {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.cert-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(102, 126, 234, 0.3);
}

.cert-card:hover .cert-icon {
    transform: scale(1.1) rotate(5deg);
    animation: glow 2s ease-in-out infinite;
}

.cert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-vibrant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.cert-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cert-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.footer-logo:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.footer-logo-img {
    height: 35px;
    width: auto;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-section ul li i {
    margin-right: 8px;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Admin Panel */
.admin-nav-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: inherit;
}

.admin-nav-btn:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.admin-nav-btn i {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

.admin-nav-btn span {
    font-size: 0.9rem;
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn-modal {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    backdrop-filter: blur(10px);
}

.logout-btn-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logout-btn-modal:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.logout-btn-modal i {
    font-size: 16px;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.admin-news-list {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.admin-news-item {
    background: var(--glass-bg);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-news-item h4 {
    margin: 0;
    color: var(--text-primary);
}

.delete-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.delete-btn:hover {
    background: #c53030;
}

/* Responsive Design */
@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
    }
    
    .nav-menu-content {
        gap: 1.5rem;
    }
    
    .nav-toggle {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .nav-menu-content {
        gap: 2rem;
    }
}

/* ==================== CAROUSEL STYLES (MOBILE ONLY) ==================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: pan-y pinch-zoom;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
}

.carousel-wrapper.no-transition {
    transition: none;
}

.carousel-slide {
    flex: 0 0 calc(100% - 40px);
    width: calc(100% - 40px);
    margin: 0 20px;
    min-width: 0;
    box-sizing: border-box;
}

.carousel-slide > * {
    width: 100%;
    margin: 0 !important;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Touch indicator */
.carousel-touch-hint {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@media (max-width: 768px) {
    
    .container {
        padding: 0 10px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu-content {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-radius: 25px;
        padding: 2rem 1.5rem;
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.3);
        max-width: 350px;
        width: 90%;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .nav-menu .nav-link {
        display: block;
        padding: 0.8rem 1.2rem;
        margin: 0.3rem 0;
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        font-size: 1rem;
        font-weight: 500;
    }

    .nav-menu .admin-nav-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 1.2rem;
        margin: 0.3rem 0;
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        font-size: 1rem;
        font-weight: 500;
        width: 100%;
        border: none;
        color: var(--text-primary);
    }

    .nav-menu .nav-link:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }

    .nav-menu .admin-nav-btn:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }

    .nav-menu .language-selector {
        display: flex;
        justify-content: center;
        margin: 1rem 0;
        gap: 0.8rem;
    }

    .nav-menu .language-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .nav-menu .nav-link::after {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-main-logo {
        width: 220px;
        height: 220px;
        border-radius: 20%;
    }

    .logo-img {
        height: 35px;
        width: 35px;
    }

    .footer-logo-img {
        height: 25px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-features {
        justify-content: center;
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
        padding: 0 10px;
    }

    /* Team Section - Mobile Responsive */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .team-card {
        height: auto;
        min-height: 600px;
        margin: 0;
    }

    .team-card .team-info {
        padding: 2rem 1.5rem;
    }
    
    .carousel-container .team-card {
        margin: 0;
    }

    /* Services Section - Mobile Responsive */
    .services-grid {
        padding: 0;
    }
    
    .service-card {
        height: auto;
        min-height: 500px;
        margin: 0;
    }

    .service-card .service-content {
        padding: 2rem 1.5rem;
    }
    
    .carousel-container .service-card {
        margin: 0;
    }

    /* Location Section - Mobile Responsive */
    .location-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .location-map-card iframe {
        height: 250px;
    }

    .location-card {
        height: auto;
        min-height: 350px;
        margin: 0 0 1rem 0;
    }

    .location-card .location-content {
        padding: 2rem 1.5rem;
    }

    /* Downloadables Section - Mobile Responsive */
    .downloadables-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .downloadable-card {
        height: auto;
        min-height: 400px;
        margin: 0;
    }

    .downloadable-card .downloadable-content {
        padding: 2rem 1.5rem;
    }
    
    .carousel-container .downloadable-card {
        margin: 0;
    }

    /* Contact Section - Mobile Responsive */
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .contact-card {
        margin: 0 0 1rem 0;
    }

    /* Delivery Section - Mobile Responsive */
    .delivery-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .delivery-card {
        margin: 0 0 1rem 0;
    }

    /* Certifications Section - Mobile Responsive */
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0;
    }
    
    .cert-card {
        margin: 0;
    }

    /* Footer - Mobile Responsive */
    .footer {
        padding: 2.5rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .social-links {
        justify-content: center;
    }
    
    /* Admin Panel Responsive */
    .admin-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
    }
    
    .admin-news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .news-item-actions {
        align-self: flex-end;
    }
}

/* Enhanced Admin Panel Styles */
#login-modal .modal-content {
    max-width: 400px;
}

.error-message {
    background: #fee;
    color: #c53030;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #feb2b2;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-news-list {
    max-height: 400px;
    overflow-y: auto;
}

.admin-news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.news-item-content {
    flex: 1;
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.news-item-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.news-preview {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.has-image {
    color: var(--primary-color);
}

.news-item-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn {
    color: var(--primary-color);
}

.edit-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.delete-btn {
    color: #e53e3e;
}

.delete-btn:hover {
    background: rgba(229, 62, 62, 0.1);
}

.no-news {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}

.loading-news {
    text-align: center;
    color: var(--primary-color);
    padding: 2rem;
    font-weight: 500;
}

.loading-news::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Preview de noticia en modal admin */
.news-preview-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.news-preview-container.has-content {
    border-color: var(--primary-color);
    background: white;
}

.news-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.news-preview-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.news-preview-image {
    width: 100%;
    max-height: 200px;
    min-height: 120px;
    background: var(--gradient);
    border-radius: 10px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.news-preview-image.has-custom-image {
    background: none;
    overflow: hidden;
}

.news-preview-image.has-custom-image::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    background-image: inherit;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(15px);
    transform: scale(1.4);
    z-index: 1;
}

.news-preview-image.has-custom-image .preview-image-main {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.image-input-container {
    position: relative;
}

.image-preview-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.image-preview-btn:hover {
    background: var(--secondary-color);
}

.image-preview-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Estilos para subida de archivos */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-select-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    user-select: none;
}

.file-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.file-select-btn:active {
    transform: translateY(0);
}

/* Asegurar que el label funcione en dispositivos táctiles */
.file-select-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.file-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.image-preview-container {
    margin-top: 1rem;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.image-preview-container img {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
}

/* Asegurar que las imágenes de fondo no se repitan */
.news-image.has-custom-image::before,
.news-preview-image.has-custom-image::before,
.news-preview-image.has-local-image::before {
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
}

/* Estilos para el preview de noticia con archivos locales */
.news-preview-image.has-local-image {
    background: none;
    position: relative;
    overflow: hidden;
}

.news-preview-image.has-local-image::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    background-image: inherit;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(15px);
    transform: scale(1.4);
    z-index: 1;
}

.news-preview-image.has-local-image .preview-image-main {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .delivery-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .delivery-form-container,
    .contact-form-container {
        margin-left: 10px;
        margin-right: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .news-preview-container {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .news-preview-image {
        max-height: 150px;
        min-height: 100px;
    }
    
    .news-preview-image.has-custom-image .preview-image-main,
    .news-preview-image.has-local-image .preview-image-main {
        max-height: 130px;
    }

    .whatsapp-button {
        bottom: 80px;
        left: 10px;
    }
    
    .whatsapp-link {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-main-logo {
        width: 180px;
        height: 180px;
        border-radius: 20%;
    }

    .logo-img {
        height: 30px;
        width: 30px;
    }

    .footer-logo-img {
        height: 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Team Section - Extra Small Mobile */
    .team-card {
        min-height: 550px;
    }

    .team-card .team-info {
        padding: 1.5rem 1rem;
    }

    .team-info h3 {
        font-size: 1.2rem;
    }

    .team-description {
        font-size: 0.9rem;
    }

    /* Services Section - Extra Small Mobile */
    .service-card {
        min-height: 450px;
    }

    .service-card .service-content {
        padding: 1.5rem 1rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Location Section - Extra Small Mobile */
    .location-map-card iframe {
        height: 200px;
    }

    .location-card {
        min-height: 300px;
    }

    .location-card .location-content {
        padding: 1.5rem 1rem;
    }

    .location-card h3 {
        font-size: 1.1rem;
    }

    /* Downloadables Section - Extra Small Mobile */
    .downloadable-card {
        min-height: 350px;
    }

    .downloadable-card .downloadable-content {
        padding: 1.5rem 1rem;
    }

    .downloadable-card h3 {
        font-size: 1.1rem;
    }

    /* Contact Section - Extra Small Mobile */
    .contact-card {
        padding: 1.5rem;
    }

    .contact-card h3 {
        font-size: 1.1rem;
    }

    /* Certifications Section - Extra Small Mobile */
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cert-card {
        padding: 1.5rem;
    }

    .cert-card h3 {
        font-size: 1.1rem;
    }

    /* Footer - Extra Small Mobile */
    .footer-section h3 {
        font-size: 1.1rem;
    }

    .footer-section ul li {
        font-size: 0.9rem;
    }
}

/* Rich Text Editor Styles */
.rich-text-editor {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.rich-text-editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.toolbar-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

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

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 0.25rem;
}

.editor-content {
    min-height: 120px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    outline: none;
    overflow-y: auto;
}

.editor-content:empty:before {
    content: attr(data-placeholder);
    color: var(--text-secondary);
    font-style: italic;
    pointer-events: none;
}

.editor-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
}

.editor-content p {
    margin: 0.5rem 0;
}

.editor-content ul, .editor-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.editor-content li {
    margin: 0.25rem 0;
}

.editor-content strong {
    font-weight: 600;
}

.editor-content em {
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
