/* ============================================
   Sombras y Susurros — Theme
   Dark, atmospheric design inspired by book covers
   Vol 1: cool blue-grey | Vol 2: warm sepia | Vol 3: earth brown
   ============================================ */

:root {
    --bg-darkest:    #0a0a0f;
    --bg-dark:       #0f0f18;
    --bg-darker:     #141420;
    --bg-card:       #1a1a2a;
    --bg-card-hover: #222236;
    --text-primary:  #e8e0d8;
    --text-muted:    #9a9aab;
    --accent:        #c4956a;
    --accent-hover:  #d4a87a;
    --accent-dark:   #8b6914;
    --vol1-color:    #4a6580;
    --vol2-color:    #c4956a;
    --vol3-color:    #6a4a7a;
    --font-display:  'Cinzel', Georgia, serif;
    --font-body:     'Inter', system-ui, sans-serif;
    --navbar-height: 70px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-darkest);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: var(--bg-darkest);
}

.text-light-muted { color: var(--text-muted) !important; }

/* === Navbar === */
.navbar {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(196, 149, 106, 0.1);
    padding: 0.8rem 0;
    transition: background 0.3s;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0;
}

.brand-text { color: var(--text-primary); }
.brand-y { color: var(--accent); }

.navbar .nav-link {
    font-family: var(--font-display);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}
.navbar .nav-link:hover { color: var(--accent); }
.navbar .nav-link.active { color: var(--accent); }

/* === Hero === */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../imgs/hero-bg.jpg') center center / cover no-repeat;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 15, 0.4) 0%, rgba(10, 10, 15, 0.2) 40%, rgba(10, 10, 15, 0.6) 80%, var(--bg-darkest) 100%),
        radial-gradient(ellipse at center 60%, transparent 30%, rgba(10, 10, 15, 0.5) 100%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* === Fog/Smoke Animation === */
.fog-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.fog-overlay::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,0,0,0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(0,0,0,0.18) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(0,0,0,0.15) 0%, transparent 45%);
    filter: blur(40px);
    animation: fogDrift1 25s ease-in-out infinite alternate;
    will-change: transform;
}

.fog-overlay::after {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 70% 60%, rgba(0,0,0,0.20) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(0,0,0,0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 20%, rgba(0,0,0,0.12) 0%, transparent 40%);
    filter: blur(50px);
    animation: fogDrift2 30s ease-in-out infinite alternate;
    will-change: transform;
}

.fog-layer-3 {
    position: absolute;
    inset: -30%;
    width: 160%;
    height: 160%;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 40% 40%, rgba(0,0,0,0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 55%, rgba(0,0,0,0.12) 0%, transparent 40%);
    filter: blur(60px);
    animation: fogDrift3 35s ease-in-out infinite alternate;
    will-change: transform;
    z-index: 1;
}

@keyframes fogDrift1 {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50%  { opacity: 1; }
    100% { transform: translate(8%, -3%) scale(1.05); opacity: 0.7; }
}

@keyframes fogDrift2 {
    0%   { transform: translate(0, 0) scale(1.02); opacity: 0.7; }
    50%  { opacity: 0.95; }
    100% { transform: translate(-6%, 4%) scale(1); opacity: 0.6; }
}

@keyframes fogDrift3 {
    0%   { transform: translate(3%, 2%) scale(1); opacity: 0.6; }
    50%  { opacity: 0.85; }
    100% { transform: translate(-4%, -2%) scale(1.08); opacity: 0.5; }
}

.hero-content { position: relative; z-index: 1; padding: 6rem 0; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

.hero-y {
    color: var(--accent);
    font-weight: 400;
    text-transform: lowercase;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-style: normal;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-authors {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.05rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* === Sections === */
.section-dark   { background: var(--bg-dark); }
.section-darker { background: var(--bg-darker); }
.section-cta    { background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.page-header {
    padding-top: calc(var(--navbar-height) + 3rem);
    padding-bottom: 2rem;
    background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
}

/* === Intro Quote === */
.intro-quote {
    border-left: 3px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(196, 149, 106, 0.05);
    border-radius: 0 8px 8px 0;
}

.intro-quote p {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent);
    margin: 0;
    line-height: 1.7;
}

/* === Breadcrumbs === */
.breadcrumb-wrapper {
    padding-top: calc(var(--navbar-height) + 1.5rem);
    padding-bottom: 0;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* === Book Cards (home) === */
.book-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px color-mix(in srgb, var(--book-accent) 20%, transparent);
}

.book-cover {
    width: auto;
    height: 380px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.book-card:hover .book-cover { transform: scale(1.03); }

.book-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
}

.book-card-year {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === Books listing === */
.libro-row {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--book-accent, var(--accent));
}

.book-cover-lg {
    width: 100%;
    max-width: 260px;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.libro-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.libro-subtitle {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.libro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.libro-meta i {
    color: var(--accent);
    margin-right: 0.3rem;
}

/* === Book detail === */
.book-cover-full {
    width: 100%;
    max-width: 350px;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.libro-specs { max-width: 500px; }
.libro-specs th {
    color: var(--accent);
    font-weight: 500;
    width: 120px;
    font-size: 0.9rem;
}
.libro-specs td { font-size: 0.9rem; }

/* === Author Cards === */
.author-card {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.author-photo-wrapper {
    text-align: center;
    margin-bottom: 1.5rem;
}

.author-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(196, 149, 106, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.author-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* === Media Cards === */
.media-card {
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.media-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-top: 0.75rem;
}

.media-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
}

.badge-video        { background: var(--vol1-color); color: #fff; }
.badge-podcast      { background: var(--vol2-color); color: var(--bg-darkest); }
.badge-entrevista   { background: var(--vol3-color); color: #fff; }
.badge-presentacion { background: #4a4a6a; color: #fff; }

/* === Historia Cards === */
.historia-card {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent);
    height: 100%;
}

.historia-text {
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.historia-author {
    font-size: 0.9rem;
    color: var(--accent);
}

/* === Forms === */
.form-card {
    padding: 2.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-control,
.form-select {
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-darker);
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(196, 149, 106, 0.2);
}

.form-control::placeholder { color: rgba(154, 154, 171, 0.5); }

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* === Buttons === */
.btn-cta {
    background: #28a745;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
}

.btn-cta:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: background 0.2s, transform 0.2s;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}

/* === Footer === */
.site-footer {
    background: var(--bg-darkest);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.site-footer .text-muted {
    color: var(--text-muted) !important;
}

.site-footer a {
    color: var(--accent) !important;
    text-decoration: none;
    transition: opacity 0.2s;
}

.site-footer a:hover {
    opacity: 0.8;
}

/* === Alert overrides === */
.alert {
    border-radius: 8px;
    border: none;
}

/* === Table dark override === */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: rgba(255, 255, 255, 0.05);
}

/* === Responsive === */
@media (max-width: 767.98px) {
    .hero-title { font-size: 2.5rem; }
    .hero-section { min-height: 80vh; }
    .libro-row { padding: 1.5rem; }
    .form-card { padding: 1.5rem; }
    .book-cover-lg { max-width: 200px; }
    .book-cover-full { max-width: 250px; }
    .libro-meta { gap: 0.5rem; font-size: 0.8rem; }
}

@media (max-width: 575.98px) {
    .navbar .nav-link { padding: 0.5rem 0; }
    .page-header { padding-top: calc(var(--navbar-height) + 2rem); }
}
