/*
Theme Name: CatasVinum
Theme URI: https://catas.vinumqr.com
Description: Tema oscuro wine para CatasVinum QuizLive. Child theme de Twenty Twenty-Five.
Author: CatasVinum
Author URI: https://catas.vinumqr.com
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catasvinum
*/

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --cv-bg-deep: #0f172a;
    --cv-bg-purple: #1e1b4b;
    --cv-wine-dark: rgba(114, 47, 55, 0.4);
    --cv-wine-warm: rgba(88, 28, 12, 0.4);
    --cv-text-white: #f8fafc;
    --cv-text-muted: rgba(255, 255, 255, 0.6);
    --cv-glass-bg: rgba(255, 255, 255, 0.05);
    --cv-glass-border: rgba(255, 255, 255, 0.1);
    --cv-glass-blur: 16px;
    --cv-rose-400: #fb7185;
    --cv-rose-500: #f43f5e;
    --cv-rose-600: #e11d48;
    --cv-amber-200: #fde68a;
    --cv-amber-400: #fbbf24;
    --cv-radius-lg: 16px;
    --cv-radius-xl: 20px;
    --cv-radius-2xl: 24px;
}

/* ========================================
   GLOBAL: Dark wine background
   ======================================== */
body {
    background: linear-gradient(to bottom right, var(--cv-bg-deep), var(--cv-bg-purple)) !important;
    background-color: var(--cv-bg-deep) !important;
    background-image:
        radial-gradient(circle at 10% 20%, var(--cv-wine-dark) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, var(--cv-wine-warm) 0%, transparent 20%),
        linear-gradient(to bottom right, var(--cv-bg-deep), var(--cv-bg-purple)) !important;
    background-attachment: fixed;
    color: var(--cv-text-white) !important;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* ========================================
   HEADER
   ======================================== */
.wp-site-blocks > .wp-block-group:first-child,
header.wp-block-template-part {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(var(--cv-glass-blur));
    -webkit-backdrop-filter: blur(var(--cv-glass-blur));
    border-bottom: 1px solid var(--cv-glass-border);
    padding: 16px 32px;
}

/* Site title */
.wp-block-site-title a {
    color: var(--cv-text-white) !important;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none !important;
    background: linear-gradient(to right, var(--cv-rose-400), var(--cv-amber-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wp-block-site-title a:hover {
    opacity: 0.85;
}

/* Navigation links */
.wp-block-navigation a {
    color: var(--cv-text-muted) !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.wp-block-navigation a:hover,
.wp-block-navigation a:focus,
.wp-block-navigation .current-menu-item a {
    color: var(--cv-text-white) !important;
}

/* Navigation responsive */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    color: var(--cv-text-white) !important;
}

.wp-block-navigation__responsive-container.is-menu-open {
    background: rgba(15, 23, 42, 0.97) !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation a {
    color: var(--cv-text-white) !important;
    font-size: 1.2rem;
}

/* ========================================
   PAGE TITLE
   ======================================== */
.wp-block-post-title,
h1.wp-block-post-title {
    color: var(--cv-text-white) !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--cv-rose-400), var(--cv-amber-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.wp-block-post-content {
    color: var(--cv-text-white);
}

.wp-block-post-content p {
    color: var(--cv-text-muted);
}

.wp-block-post-content a {
    color: var(--cv-rose-400);
    text-decoration: underline;
}

.wp-block-post-content a:hover {
    color: var(--cv-amber-200);
}

/* Generic headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--cv-text-white) !important;
}

/* ========================================
   FOOTER
   ======================================== */
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-group:last-child,
footer.wp-block-template-part {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(var(--cv-glass-blur));
    -webkit-backdrop-filter: blur(var(--cv-glass-blur));
    border-top: 1px solid var(--cv-glass-border);
    color: var(--cv-text-muted) !important;
    margin-top: 60px;
}

footer a,
.wp-site-blocks > .wp-block-group:last-child a {
    color: var(--cv-text-muted) !important;
    text-decoration: none !important;
}

footer a:hover,
.wp-site-blocks > .wp-block-group:last-child a:hover {
    color: var(--cv-text-white) !important;
}

footer p,
.wp-site-blocks > .wp-block-group:last-child p {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ========================================
   QUIZLIVE SHORTCODE OVERRIDES
   Remove dark wrapper backgrounds since
   the theme itself is now dark.
   ======================================== */
.ql-shortcode-wrapper {
    background: transparent !important;
    border-radius: 0;
}

/* ========================================
   WP BLOCKS: Override light defaults
   ======================================== */
.wp-block-group {
    color: var(--cv-text-white);
}

.wp-block-columns {
    color: var(--cv-text-white);
}

.wp-block-spacer {
    background: transparent;
}

/* ========================================
   FORMS AND INPUTS (WP default)
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--cv-glass-border);
    color: var(--cv-text-white);
    border-radius: var(--cv-radius-lg);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--cv-rose-500);
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ========================================
   BUTTONS (WP default)
   ======================================== */
.wp-block-button__link,
.wp-element-button {
    background: linear-gradient(to right, var(--cv-rose-600), #9f1239) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--cv-radius-xl) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cv-bg-deep);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
    background: rgba(244, 63, 94, 0.3);
    color: var(--cv-text-white);
}

/* ========================================
   ADMIN BAR FIX
   ======================================== */
#wpadminbar {
    opacity: 0.9;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .wp-site-blocks > .wp-block-group:first-child,
    header.wp-block-template-part {
        padding: 12px 16px;
    }

    .wp-block-site-title a {
        font-size: 1.2rem;
    }

    .wp-block-post-title,
    h1.wp-block-post-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .wp-block-post-title,
    h1.wp-block-post-title {
        font-size: 1.5rem;
    }
}
