/*
Theme Name: NotaSimpleFácil
Theme URI: https://notasimplefacil.es
Author: Daniel Pozo
Author URI: https://notasimplefacil.es
Description: Theme profesional para NotaSimpleFácil - Solicitud de notas simples registrales online con calificación incluida. Optimizado para SEO y Core Web Vitals.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: notasimplefacil
Tags: e-commerce, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
WooCommerce: 9.0
*/

:root {
    /* Paleta corporativa institucional - estilo registral */
    --nsf-primary: #1a3a5c;
    --nsf-primary-dark: #0d1f33;
    --nsf-primary-light: #2c5282;
    --nsf-secondary: #0066a1;
    --nsf-secondary-light: #0088cc;
    --nsf-accent: #c9302c;
    --nsf-warning: #d9831f;
    --nsf-danger: #c9302c;
    --nsf-success: #3c763d;
    --nsf-text: #333333;
    --nsf-text-light: #666666;
    --nsf-bg: #ffffff;
    --nsf-bg-light: #f8f9fa;
    --nsf-bg-alt: #e9ecef;
    --nsf-bg-card: #ffffff;
    --nsf-border: #dee2e6;
    --nsf-border-dark: #ced4da;
    --nsf-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --nsf-shadow-lg: 0 4px 15px rgba(0,0,0,0.1);
    --nsf-radius: 4px;
    --nsf-radius-lg: 8px;
    --nsf-transition: 0.2s ease;
    --nsf-max-width: 1200px;
    --nsf-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--nsf-font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--nsf-text);
    background: var(--nsf-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--nsf-secondary);
    text-decoration: none;
    transition: color var(--nsf-transition);
}

a:hover {
    color: var(--nsf-primary);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--nsf-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin: 0 0 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--nsf-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Header - Estilo institucional */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nsf-bg);
    border-bottom: 3px solid var(--nsf-primary);
    box-shadow: var(--nsf-shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    max-width: var(--nsf-max-width);
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--nsf-primary);
}

.site-logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        gap: 0;
    }
}

.main-nav a {
    font-weight: 500;
    padding: 0.75rem 1rem;
    color: var(--nsf-text);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.main-nav a:hover,
.main-nav a.current {
    color: var(--nsf-primary);
    border-bottom-color: var(--nsf-secondary);
    text-decoration: none;
    background: var(--nsf-bg-light);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--nsf-primary);
    transition: var(--nsf-transition);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nsf-bg);
    z-index: 1001;
    padding: 5rem 2rem 2rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 1rem 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--nsf-border);
    color: var(--nsf-text);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Buttons - Estilo institucional */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--nsf-radius);
    cursor: pointer;
    transition: all var(--nsf-transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--nsf-secondary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--nsf-secondary-light);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: var(--nsf-primary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--nsf-primary-light);
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--nsf-primary);
    color: var(--nsf-primary);
}

.btn-outline:hover {
    background: var(--nsf-primary);
    color: #fff;
    text-decoration: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Hero Section - Estilo más sobrio */
.hero {
    background: linear-gradient(180deg, var(--nsf-primary) 0%, var(--nsf-primary-dark) 100%);
    color: #fff;
    padding: 2.5rem 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 2rem;
    }
}

.hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.0625rem;
    opacity: 0.95;
    max-width: 650px;
    margin: 0 auto 1.5rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 480px) {
    .hero-cta {
        flex-direction: row;
    }
}

/* Cards */
.card {
    background: var(--nsf-bg-card);
    border: 1px solid var(--nsf-border);
    border-radius: var(--nsf-radius-lg);
    padding: 1.5rem;
    transition: var(--nsf-transition);
}

.card:hover {
    box-shadow: var(--nsf-shadow-lg);
    border-color: var(--nsf-border-dark);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--nsf-secondary);
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--nsf-text-light);
    margin: 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    gap: 1.5rem;
    padding: 2.5rem 0;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Price Display */
.price {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--nsf-success);
}

.price-note {
    font-size: 0.875rem;
    color: var(--nsf-text-light);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--nsf-border);
    border-bottom: 1px solid var(--nsf-border);
    background: var(--nsf-bg-light);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--nsf-text-light);
}

.trust-badge svg {
    width: 20px;
    height: 20px;
    color: var(--nsf-success);
}

/* Steps */
.steps {
    counter-reset: step;
    padding: 2rem 0;
}

.step {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--nsf-border);
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: var(--nsf-secondary);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    font-size: 0.875rem;
}

.step-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.step-content p {
    margin: 0;
    color: var(--nsf-text-light);
}

/* Semaforo de riesgo */
.risk-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--nsf-radius);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
}

.risk-green {
    background: #dff0d8;
    color: var(--nsf-success);
    border: 1px solid #d6e9c6;
}

.risk-yellow {
    background: #fcf8e3;
    color: #8a6d3b;
    border: 1px solid #faebcc;
}

.risk-red {
    background: #f2dede;
    color: var(--nsf-danger);
    border: 1px solid #ebccd1;
}

/* Footer - Estilo institucional */
.site-footer {
    background: var(--nsf-primary-dark);
    color: #fff;
    padding: 2.5rem 1rem 1rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    max-width: var(--nsf-max-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
    border-bottom: 2px solid var(--nsf-secondary);
    padding-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.85);
    display: block;
    padding: 0.25rem 0;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.7);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--nsf-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid var(--nsf-border-dark);
    border-radius: var(--nsf-radius);
    transition: border-color var(--nsf-transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--nsf-secondary);
    box-shadow: 0 0 0 3px rgba(0,102,161,0.15);
}

.form-help {
    font-size: 0.8125rem;
    color: var(--nsf-text-light);
    margin-top: 0.25rem;
}

/* WooCommerce overrides */
.woocommerce .button,
.woocommerce button.button {
    background: var(--nsf-secondary) !important;
    color: #fff !important;
    border-radius: var(--nsf-radius) !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
}

.woocommerce .button:hover {
    background: var(--nsf-secondary-light) !important;
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--nsf-secondary) !important;
    background: var(--nsf-bg-light) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--nsf-secondary) !important;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-6 { padding-top: 3rem; padding-bottom: 3rem; }

/* Section */
.section {
    padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
    .section {
        padding: 3.5rem 2rem;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-bg {
    background: var(--nsf-bg-light);
}

/* Alertas institucionales */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--nsf-radius);
    margin-bottom: 1rem;
}

.alert-info {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}

.alert-success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.alert-warning {
    background: #fcf8e3;
    border: 1px solid #faebcc;
    color: #8a6d3b;
}

.alert-danger {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nsf-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* Tablas institucionales */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--nsf-border);
}

table th {
    background: var(--nsf-bg-light);
    font-weight: 600;
    color: var(--nsf-primary);
}

table tr:hover {
    background: var(--nsf-bg-light);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    color: var(--nsf-text-light);
    border-bottom: 1px solid var(--nsf-border);
    background: var(--nsf-bg-light);
}

.breadcrumbs a {
    color: var(--nsf-secondary);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--nsf-border-dark);
}

/* Registro directory styles */
.registro-card {
    border: 1px solid var(--nsf-border);
    border-radius: var(--nsf-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--nsf-bg);
}

.registro-card:hover {
    border-color: var(--nsf-secondary);
    background: var(--nsf-bg-light);
}

.registro-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.registro-card .meta {
    font-size: 0.875rem;
    color: var(--nsf-text-light);
}

.registro-card .btn-solicitar {
    margin-top: 0.75rem;
}
