/**
 * Excel Planung Theme Custom Styles
 */

/* WordPress Core Alignment */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: 100%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }

/* WordPress Navigation */
.nav-links { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: 0.5rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.nav-links .current { background: #2563eb; color: white; border-color: #2563eb; }
.nav-links a:hover { background: #f9fafb; }

/* Custom Logo */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 40px; width: auto; }

/* Navigation Menu Items */
.menu-item a { color: #374151; font-weight: 500; transition: color 0.15s; }
.menu-item a:hover { color: #2563eb; }
.current-menu-item a { color: #2563eb; }

/* Widget Styles */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; color: white; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 0.5rem; }
.widget ul li a { color: #9ca3af; transition: color 0.15s; }
.widget ul li a:hover { color: white; }

/* FAQ Toggle Animation */
.faq-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Download Button Animation */
.download-btn { position: relative; overflow: hidden; }
.download-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.download-btn:active::after { width: 200px; height: 200px; }

/* Mobile Menu */
#mobile-menu.active { display: block; }

/* Cookie Banner Animation */
#cookie-banner.show { display: block; animation: slideUp 0.3s ease; }
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 40;
}
#scroll-to-top:hover { background: #1d4ed8; transform: translateY(-2px); }
#scroll-to-top.show { display: flex; }

/* Print Styles */
@media print {
    header, footer, .download-btn, #cookie-banner, #scroll-to-top { display: none !important; }
    body { font-size: 12pt; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
   EXCEL MOCKUP STYLES
   ===================================================== */

.excel-mockup-container {
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease;
}

.excel-mockup-container:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.excel-window {
    background: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 11px;
}

/* Title Bar */
.excel-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #217346 0%, #1a5c38 100%);
    padding: 6px 12px;
    color: white;
}

.excel-titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.excel-icon {
    width: 18px;
    height: 18px;
}

.excel-filename {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.95;
}

.excel-titlebar-buttons {
    display: flex;
    gap: 8px;
}

.excel-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.excel-btn.minimize { background: #f5c242; }
.excel-btn.maximize { background: #3dc04f; }
.excel-btn.close { background: #ed594a; }

/* Ribbon */
.excel-ribbon {
    background: #217346;
    padding: 4px 12px;
    border-bottom: 1px solid #1a5c38;
}

.excel-ribbon-tabs {
    display: flex;
    gap: 16px;
    color: white;
    font-size: 11px;
}

.excel-ribbon-tabs span {
    padding: 4px 0;
    opacity: 0.7;
    cursor: pointer;
}

.excel-ribbon-tabs span.active {
    opacity: 1;
    border-bottom: 2px solid white;
}

/* Formula Bar */
.excel-formula-bar {
    display: flex;
    align-items: center;
    background: white;
    border-bottom: 1px solid #d6d6d6;
    padding: 4px 8px;
    gap: 8px;
}

.excel-cell-ref {
    min-width: 50px;
    padding: 2px 6px;
    background: #f5f5f5;
    border: 1px solid #d6d6d6;
    font-size: 10px;
    text-align: center;
}

.excel-fx {
    color: #666;
    font-style: italic;
    font-size: 10px;
}

.excel-formula-input {
    flex: 1;
    padding: 2px 6px;
    background: white;
    border: 1px solid #d6d6d6;
    font-size: 10px;
    color: #333;
    min-height: 18px;
}

/* Spreadsheet Grid */
.excel-sheet-area {
    background: white;
    overflow: hidden;
}

.excel-grid {
    display: grid;
    grid-template-columns: 30px repeat(5, 1fr);
    border: 1px solid #d6d6d6;
}

.excel-corner {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
}

.excel-col-header {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    padding: 4px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.excel-row-header {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    padding: 4px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.excel-cell {
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 4px 6px;
    min-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

/* Cell Types */
.excel-cell.header-cell {
    background: #217346;
    color: white;
    font-weight: 600;
}

.excel-cell.number-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.excel-cell.currency-cell {
    text-align: right;
    color: #1a5c38;
    font-weight: 500;
}

.excel-cell.total-label {
    font-weight: 600;
    text-align: right;
}

.excel-cell.total-cell {
    font-weight: 700;
    text-align: right;
    background: #f0f7f4;
}

.excel-cell.total-cell.highlight {
    background: #d4edda;
    color: #155724;
}

.excel-cell.positive {
    color: #28a745;
}

.excel-cell.warning {
    color: #ffc107;
}

.excel-cell.critical {
    color: #dc3545;
    font-weight: 600;
}

/* Sheet Tabs */
.excel-sheet-tabs {
    display: flex;
    align-items: flex-end;
    background: #e0e0e0;
    padding: 4px 8px 0;
    gap: 2px;
}

.excel-sheet-tab {
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 10px;
    color: #666;
    cursor: pointer;
    border: 1px solid #c0c0c0;
    border-bottom: none;
}

.excel-sheet-tab.active {
    background: white;
    color: #333;
    font-weight: 500;
}

.excel-sheet-tab-add {
    padding: 4px 8px;
    color: #888;
    cursor: pointer;
    font-size: 12px;
}

/* Status Bar */
.excel-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #217346;
    padding: 3px 12px;
    color: white;
    font-size: 10px;
}

.excel-status-left {
    opacity: 0.9;
}

.excel-zoom {
    opacity: 0.8;
}

/* Decorative Elements */
.excel-mockup-shadow {
    position: absolute;
    bottom: -15px;
    left: 10%;
    right: 10%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%);
    filter: blur(8px);
    z-index: -1;
}

.excel-mockup-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 8px 8px 0 0;
}

/* Preview Notice */
.excel-preview-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.excel-preview-notice .notice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.excel-preview-notice p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.excel-preview-notice strong {
    color: white;
}
/* === Buscador (portado del motor nuevo) === */
.avg-search-form { position: relative; }
/* header variant: hidden on mobile, flex-grow centered on desktop */
.avg-search-form--header { display: none; }
@media (min-width: 768px) {
  .avg-search-form--header { display: flex; align-items: center; }
}
.avg-search-input {
  width: 100%; padding: 0.55rem 0.9rem 0.55rem 2.4rem;
  font-size: 0.875rem; color: #111827;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem;
  outline: none; transition: box-shadow .15s, border-color .15s; -webkit-appearance: none;
}
.avg-search-input:focus { border-color: var(--avg-secondary,#3B82F6); box-shadow: 0 0 0 3px rgba(59,130,246,.18); background:#fff; }
.avg-search-icon { position:absolute; left:0.8rem; top:50%; transform:translateY(-50%); width:1rem; height:1rem; color:#9ca3af; pointer-events:none; }
.avg-search-submit { position:absolute; right:0.35rem; top:50%; transform:translateY(-50%); background:transparent; border:0; cursor:pointer; padding:0.3rem; color:#9ca3af; display:flex; align-items:center; }
.avg-search-submit:hover { color: var(--avg-secondary,#3B82F6); }
/* hero variant */
.avg-search-form--hero { max-width:36rem; margin:0 auto 2rem; }
.avg-search-form--hero .avg-search-input { padding:1rem 7.5rem 1rem 2.9rem; font-size:1rem; background:#fff; border:0; border-radius:0.75rem; box-shadow:0 20px 40px -12px rgba(0,0,0,.35); }
.avg-search-form--hero .avg-search-icon { left:1.1rem; width:1.25rem; height:1.25rem; }
.avg-search-form--hero .avg-search-button { position:absolute; right:0.5rem; top:50%; transform:translateY(-50%); background:var(--avg-secondary,#3B82F6); color:#fff; font-weight:600; border:0; border-radius:0.5rem; padding:0.6rem 1.4rem; cursor:pointer; transition:background .15s; }
.avg-search-form--hero .avg-search-button:hover { background:var(--avg-primary,#1E3A8A); }
/* mobile variant */
.avg-search-form--mobile { padding:0 0.5rem 0.5rem; display:block; }

/* nav spacing (compiled tailwind lacks space-x-6) */
.avg-header-nav { gap: 1.75rem; }
.avg-header-nav > ul { display:flex; align-items:center; gap:1.75rem; margin:0; padding:0; list-style:none; }
.avg-header-nav > ul > a, .avg-header-nav > ul > li { white-space: nowrap; }
.avg-search-form--header { max-width: 30rem; margin-left: 2.5rem; margin-right: 2.5rem; }
@media (max-width: 1100px){ .avg-search-form--header { margin-left:1.25rem; margin-right:1.25rem; } }

/* === Utilidades Tailwind que el build purgado NO incluye ===
   Usadas por los bloques nuevos de la Home (team / process / trust).
   Sin esto las tarjetas salen sin padding ni ancho máx ("pegadas"). */
.p-7 { padding: 1.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-relaxed { line-height: 1.625; }
@media (min-width: 640px){ .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px){ .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; } }

/* === Blog/Ratgeber: utilidades Tailwind que faltan en el build === */
.pt-3 { padding-top: 0.75rem; }
.pt-12 { padding-top: 3rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-14 { padding-bottom: 3.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-10 { margin-bottom: 2.5rem; }
.gap-5 { gap: 1.25rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-2 { row-gap: 0.5rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mt-auto { margin-top: auto; }
.leading-snug { line-height: 1.375; }
.aspect-\[1200\/630\] { aspect-ratio: 1200 / 630; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
@media (min-width: 1024px){ .lg\:py-20 { padding-top: 5rem; padding-bottom: 5rem; } }
@media (min-width: 1280px){ .xl\:text-5xl { font-size: 3rem; line-height: 1; } }

/* === Tipografía del cuerpo del artículo (.prose) — el build no estiliza tablas/código === */
.prose table { width: 100%; border-collapse: collapse; margin: 1.75em 0; font-size: 0.95em; border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; }
.prose thead th { background: #1e3a8a; color: #fff; font-weight: 600; text-align: left; padding: 0.6em 0.85em; }
.prose th, .prose td { border-bottom: 1px solid #e5e7eb; padding: 0.55em 0.85em; vertical-align: top; }
.prose tbody tr:nth-child(even) { background: #f8fafc; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose :not(pre) > code { background: #eef2ff; color: #1e3a8a; font-weight: 600; padding: 0.15em 0.4em; border-radius: 0.35em; font-size: 0.88em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.prose pre { background: #0b1f4d; color: #e5e7eb; padding: 1em 1.25em; border-radius: 0.6rem; overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; color: inherit; padding: 0; font-weight: 400; white-space: pre; }
.prose blockquote { border-left: 4px solid #2563eb; background: #f8fafc; padding: 0.75em 1.1em; margin: 1.5em 0; color: #475569; font-style: italic; border-radius: 0 0.4rem 0.4rem 0; }
.prose img { border-radius: 0.75rem; }
.prose h2 { border-bottom: 1px solid #eef2f7; padding-bottom: 0.3em; scroll-margin-top: 5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
/* Móvil: tablas con scroll horizontal en vez de romper el layout */
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose { font-size: 1rem; }
}

/* Hero: bloque de autores (E-E-A-T) — espaciado y UX cuidados */
.avg-hero-authors { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin-bottom: 2rem; }
.avg-author { display: flex; align-items: center; gap: 0.75rem; }
.avg-author-av { width: 48px; height: 48px; border-radius: 9999px; border: 2px solid rgba(255,255,255,0.35); box-shadow: 0 2px 10px rgba(0,0,0,0.18); flex-shrink: 0; }
.avg-author-txt { display: flex; flex-direction: column; line-height: 1.25; }
.avg-author-role { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(219,234,254,0.75); }
.avg-author-name { font-size: 0.95rem; font-weight: 600; color: #ffffff; }
.avg-author-sep { width: 1px; height: 32px; background: rgba(255,255,255,0.18); }
@media (max-width: 640px) {
  .avg-hero-authors { gap: 1rem 1.5rem; }
  .avg-author-sep { display: none; }
}
