/**
 * Estilos frontend para Cirkadian Print Lulu
 */

/* Variables */
:root {
    --cpl-primary: #7CB342;
    --cpl-primary-dark: #689F38;
    --cpl-secondary: #9E9E9E;
    --cpl-dark: #333333;
    --cpl-light: #F5F5F5;
    --cpl-white: #FFFFFF;
    --cpl-success: #4CAF50;
    --cpl-error: #F44336;
    --cpl-warning: #FF9800;
    --cpl-border: #E0E0E0;
}

/* Formulario de libro */
.cpl-print-book-form {
    background: var(--cpl-light);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--cpl-border);
}

.cpl-print-book-form h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    color: var(--cpl-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpl-field {
    margin-bottom: 25px;
}

.cpl-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cpl-dark);
    font-size: 14px;
}

.cpl-field input[type="number"],
.cpl-field input[type="file"],
.cpl-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--cpl-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--cpl-white);
}

.cpl-field input:focus,
.cpl-field select:focus {
    border-color: var(--cpl-primary);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
    outline: none;
}

.cpl-field small {
    display: block;
    margin-top: 6px;
    color: var(--cpl-secondary);
    font-size: 13px;
}

/* Dropzone para archivos */
.cpl-dropzone {
    border: 2px dashed var(--cpl-border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: var(--cpl-white);
    transition: all 0.3s;
    cursor: pointer;
}

.cpl-dropzone:hover {
    border-color: var(--cpl-primary);
    background: rgba(124, 179, 66, 0.02);
}

.cpl-dropzone.cpl-dragover {
    border-color: var(--cpl-primary);
    background: rgba(124, 179, 66, 0.05);
}

.cpl-dropzone-icon {
    font-size: 40px;
    color: var(--cpl-secondary);
    margin-bottom: 10px;
}

.cpl-dropzone-text {
    color: var(--cpl-dark);
    font-weight: 500;
}

.cpl-dropzone-hint {
    color: var(--cpl-secondary);
    font-size: 13px;
    margin-top: 5px;
}

/* Estados de validación */
.cpl-validation-status {
    margin-top: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 10px;
}

.cpl-validation-status.validating {
    display: flex;
    background: #FFF8E1;
    color: #F57C00;
    border-left: 4px solid var(--cpl-warning);
}

.cpl-validation-status.success {
    display: flex;
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--cpl-success);
}

.cpl-validation-status.error {
    display: flex;
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--cpl-error);
}

.cpl-validation-status::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.cpl-validation-status.validating::before {
    content: '\f110';
    animation: cpl-spin 1s linear infinite;
}

.cpl-validation-status.success::before {
    content: '\f00c';
}

.cpl-validation-status.error::before {
    content: '\f071';
}

/* Calculadora de precios */
.cpl-price-calculator {
    background: var(--cpl-white);
    border: 2px solid var(--cpl-primary);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
}

.cpl-price-calculator h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--cpl-dark);
}

#cpl-calculate-price {
    background: var(--cpl-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

#cpl-calculate-price:hover {
    background: var(--cpl-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

#cpl-calculate-price:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#cpl-price-result {
    margin-top: 20px;
    padding: 20px;
    background: var(--cpl-light);
    border-radius: 8px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--cpl-primary);
}

#cpl-price-result small {
    display: block;
    font-size: 14px;
    color: var(--cpl-secondary);
    font-weight: 400;
    margin-top: 5px;
}

/* Spinner */
.cpl-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(124, 179, 66, 0.3);
    border-radius: 50%;
    border-top-color: var(--cpl-primary);
    animation: cpl-spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Landing Page Cirkadian Print */
.cpl-landing-section {
    padding: 80px 0;
}

.cpl-landing-section.cpl-hero {
    background: linear-gradient(135deg, var(--cpl-light) 0%, var(--cpl-white) 100%);
    padding: 120px 0 80px;
}

.cpl-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.cpl-section-header h2 {
    font-size: 36px;
    color: var(--cpl-dark);
    margin-bottom: 15px;
}

.cpl-section-header p {
    color: var(--cpl-secondary);
    font-size: 18px;
}

/* Hero */
.cpl-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cpl-hero-content h1 {
    font-size: 48px;
    color: var(--cpl-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.cpl-hero-content h1 span {
    color: var(--cpl-primary);
}

.cpl-hero-content p {
    font-size: 20px;
    color: var(--cpl-secondary);
    margin-bottom: 40px;
}

.cpl-hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cpl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

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

.cpl-btn-primary:hover {
    background: var(--cpl-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.3);
    color: white;
}

.cpl-btn-secondary {
    background: var(--cpl-white);
    color: var(--cpl-dark);
    border: 2px solid var(--cpl-border);
}

.cpl-btn-secondary:hover {
    border-color: var(--cpl-primary);
    color: var(--cpl-primary);
}

/* Características */
.cpl-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.cpl-feature-card {
    background: var(--cpl-white);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cpl-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.cpl-feature-icon {
    width: 80px;
    height: 80px;
    background: var(--cpl-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
    color: var(--cpl-primary);
}

.cpl-feature-card h3 {
    font-size: 22px;
    color: var(--cpl-dark);
    margin-bottom: 15px;
}

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

/* Formularios de contacto/asesoramiento */
.cpl-form {
    max-width: 600px;
    margin: 0 auto;
}

.cpl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cpl-form-group {
    margin-bottom: 20px;
}

.cpl-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cpl-dark);
}

.cpl-form-group input,
.cpl-form-group select,
.cpl-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--cpl-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

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

.cpl-form-submit {
    width: 100%;
    padding: 16px;
    background: var(--cpl-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cpl-form-submit:hover {
    background: var(--cpl-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.3);
}

/* Mensajes de éxito/error */
.cpl-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cpl-message-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--cpl-success);
}

.cpl-message-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--cpl-error);
}

/* Calculadora en landing */
.cpl-calculator-box {
    background: var(--cpl-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.cpl-calculator-box h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--cpl-dark);
}

.cpl-calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cpl-calc-result {
    background: var(--cpl-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-top: 25px;
}

.cpl-calc-price {
    font-size: 42px;
    font-weight: 700;
    color: var(--cpl-primary);
}

.cpl-calc-price span {
    font-size: 18px;
    color: var(--cpl-secondary);
}

/* Tabla de formatos */
.cpl-formats-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cpl-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.cpl-formats-table th,
.cpl-formats-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--cpl-border);
}

.cpl-formats-table th {
    background: var(--cpl-light);
    font-weight: 600;
    color: var(--cpl-dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpl-formats-table tr:last-child td {
    border-bottom: none;
}

.cpl-formats-table code {
    background: var(--cpl-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* FAQ */
.cpl-faq-item {
    background: var(--cpl-white);
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cpl-faq-question {
    width: 100%;
    padding: 25px;
    background: none;
    border: none;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--cpl-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.cpl-faq-question:hover {
    background: var(--cpl-light);
}

.cpl-faq-question::after {
    content: '+';
    font-size: 24px;
    color: var(--cpl-primary);
}

.cpl-faq-item.active .cpl-faq-question::after {
    content: '−';
}

.cpl-faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.cpl-faq-item.active .cpl-faq-answer {
    padding: 0 25px 25px;
    max-height: 500px;
}

.cpl-faq-answer p {
    color: var(--cpl-secondary);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .cpl-landing-section {
        padding: 60px 0;
    }
    
    .cpl-landing-section.cpl-hero {
        padding: 100px 0 60px;
    }
    
    .cpl-hero-content h1 {
        font-size: 32px;
    }
    
    .cpl-hero-content p {
        font-size: 16px;
    }
    
    .cpl-hero-buttons {
        flex-direction: column;
    }
    
    .cpl-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cpl-form-row,
    .cpl-calc-row {
        grid-template-columns: 1fr;
    }
    
    .cpl-calculator-box {
        padding: 25px;
    }
    
    .cpl-calc-price {
        font-size: 32px;
    }
    
    .cpl-formats-table {
        font-size: 14px;
    }
    
    .cpl-formats-table th,
    .cpl-formats-table td {
        padding: 15px;
    }
    
    .cpl-faq-question {
        font-size: 16px;
        padding: 20px;
    }
}
