/* ========================================
   INDEX STYLES
======================================== */

:root {
    --primary-color: #c8a882;
    --primary-hover: #b8956b;
    --text-dark: #2c3e50;
    --text-medium: #6c757d;
    --text-light: #bdc3c7;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --shadow-light: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 15px;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    position: relative;
    min-height: 95vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: zoomOut 2s ease-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
    z-index: 2;
    animation: fadeIn 1.5s ease-out;
}

.hero .container {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    animation: fadeIn 2s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--background-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--background-white);
    margin-bottom: 3rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
}

.hero .btn-primary {
    background: var(--primary-color);
    color: var(--background-white);
    box-shadow: var(--shadow-light);
}

.hero .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.hero .btn-secondary {
    background: transparent;
    color: var(--background-white);
    border: 2px solid var(--background-white);
    box-shadow: var(--shadow-light);
}

.hero .btn-secondary:hover {
    background: var(--background-white);
    color: var(--primary-color);
}

/* ========================================
   ABOUT SECTION
======================================== */
.about {
    padding: 80px 0;
    background: var(--background-white);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 400;
}

.about .highlight {
    color: var(--primary-color);
}

.about > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--background-light);
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background-white);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

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

.feature-icon i {
    font-size: 40px;
}

/* ========================================
   BENEFITS SECTION
======================================== */
.benefits {
    padding: 80px 0;
    background: var(--background-light);
}

.benefits h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-dark);
    font-weight: 300;
}

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

.benefit-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

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

.benefit-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.benefit-card p {
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.5;
}

.benefit-icon i {
    font-size: 30px;
}

/* ========================================
   TEMPLATES PREVIEW SECTION (MEJORADO)
======================================== */
.templates-preview {
    padding: 80px 0;
    background: var(--background-white);
}

.templates-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 300;
}

.templates-preview > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ✅ ESTILOS MEJORADOS DE LAS CARDS */
.template-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 2px solid rgba(200, 168, 130, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.template-card img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background-color: var(--background-light);
    transition: var(--transition);
}

.template-card:hover img {
    transform: scale(1.01);
}

.template-info {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

.template-info h3 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.3;
}

.template-description {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* ✅ TEMPLATE ACTIONS (BOTONES MEJORADOS) */
.template-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.template-actions .btn,
.template-actions a,
.template-actions button {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}

.template-actions .btn i,
.template-actions a i,
.template-actions button i {
    font-size: 0.9rem;
}

.template-actions .btn:hover,
.template-actions a:hover,
.template-actions button:hover {
    transform: translateY(-2px);
}

/* Botón Ver Plantilla (secundario) */
.btn-template,
.template-actions .btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    margin: 0;
}

.btn-template:hover,
.template-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
}

.btn-template.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-light);
    color: var(--text-light);
    border-radius: 25px;
}

.btn-template.disabled:hover {
    background: transparent;
    color: var(--text-light);
    transform: none;
    border-radius: 25px;
}

/* Botón Comprar (primario) */
.template-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    border-radius: 25px;
}

.template-actions .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(200, 168, 130, 0.3);
}

.templates-cta {
    text-align: center;
    margin-top: 3rem;
}

.templates-cta .btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.templates-cta .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.template-example-info {
    margin: 5px 0;
    color: var(--text-medium);
    font-style: italic;
    font-size: 0.85rem;
}

.template-example-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

.no-templates {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.no-templates p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin: 0 0 0.5rem 0;
}

.no-templates small {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========================================
   QUOTE SECTION
======================================== */
.quote {
    position: relative;
    padding: 80px 0;
    background: url('../images/frase.webp') center 46%/cover no-repeat;
    color: var(--background-white);
    text-align: center;
    overflow: hidden;
}

.quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

.quote::after {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: url('../images/frase.webp') center 46%/cover no-repeat;
    z-index: 0;
    animation: zoomOut 2s ease-out;
}

.quote-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.quote-content h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.quote-content p {
    font-size: 1.3rem;
    color: var(--background-white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

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

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

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

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .quote-content {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.8s ease-out;
    }
    
    .quote-content.animate {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding-left: 20px;
        text-align: center;
        max-width: 100%;
    }
    
    .hero-content h1,
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .template-card img {
        height: 400px;
    }
    
    .quote-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding-left: 10px;
    }
    
    .hero-content h1,
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .template-card img {
        height: 300px;
    }
    
    .template-info {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .template-info h3 {
        font-size: 1.1rem;
    }
    
    .template-actions .btn,
    .template-actions a,
    .template-actions button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}
