/*
Theme Name: Aprendiz Theme
Theme URI: https://aprendizdeseo.top
Author: Victor
Description: Tema super ligero con Tailwind CSS para Aprendiz de SEO.
Version: 1.0.0
Text Domain: aprendiz-theme
*/

/* Core WordPress CSS support */
.alignwide {
    margin-left: -25%;
    margin-right: -25%;
    width: 150%;
    max-width: 100vw;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Logo Transparency & Styling */
.custom-logo-wrapper img.custom-logo {
    height: 4rem !important;
    width: auto !important;
    max-height: 4rem !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    mix-blend-mode: multiply;
    /* Makes white background transparent */
}



/* Header Menu Styling - Consolidated & Fixed */
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    /* Safety for small screens if not mobile */
    align-items: center;
    gap: 1.5rem;
}

header nav ul li {
    display: flex;
    /* Tailwind usually handles this, but forcing safety */
    align-items: center;
    position: relative;
    /* Critical for submenu positioning */
}

/* Links - High Contrast & Visibility */
header nav ul li a {
    color: #0f172a !important;
    /* Slate 900 - Dark & Visible */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s, background-color 0.2s;
    white-space: nowrap;
}

header nav ul li a:hover,
header nav ul li.current-menu-item>a,
header nav ul li.current-menu-parent>a {
    color: #d97706 !important;
    /* Amber 600 */
    background-color: #fffbeb;
    /* Amber 50 - Subtle bg hint */
    border-radius: 0.375rem;
}

/* Submenu styling - Critical Fixes */
header nav ul li ul.sub-menu {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 260px;
    /* Wide enough for long titles */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    /* Slate 200 */
    border-radius: 0.5rem;
    z-index: 9999;
    /* Always on top */
    padding: 0.5rem 0;
    flex-direction: column;
    /* Force Stack */
}

/* Show Submenu on Hover */
header nav ul li:hover>ul.sub-menu,
header nav ul li:focus-within>ul.sub-menu {
    display: flex;
    /* Use flex for column layout */
    animation: fadeIn 0.2s ease-out;
}

header nav ul li ul.sub-menu li {
    width: 100%;
    display: block;
    border-bottom: 1px solid #f1f5f9;
    /* Separators */
}

header nav ul li ul.sub-menu li:last-child {
    border-bottom: none;
}

header nav ul li ul.sub-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #334155 !important;
    /* Slate 700 */
    font-weight: 500;
    font-size: 0.9rem;
    white-space: normal;
    /* Allow wrapping in submenus */
}

header nav ul li ul.sub-menu li a:hover {
    background-color: #fef3c7;
    /* Amber 100 */
    color: #b45309 !important;
    /* Amber 700 */
    transform: translateX(4px);
    /* Hover nudge */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-logo {
    height: 3rem;
    width: auto;
}

.custom-logo {
    height: 3rem;
    width: auto;
}

/* Header Light Theme - Override */
header.bg-white,
header[class*="bg-white"] {
    background-color: #ffffff !important;
    border-bottom-color: #f59e0b !important;
}

header nav ul li a {
    color: #1f2937 !important;
    /* gray-800 for contrast on white */
}

header nav ul li a:hover,
header nav ul li.current-menu-item a {
    color: #f59e0b !important;
    /* amber-500 */
}

/* Hero Section - Force Blue Background with Gold Accents */
section.bg-gradient-to-br {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #000000 100%) !important;
}

/* Gold gradient for highlighted words */
.text-transparent.bg-clip-text.bg-gradient-to-r {
    background: linear-gradient(90deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Hero CTA Buttons - Force Gold Styling */
a.bg-gradient-to-r.from-amber-500 {
    background: linear-gradient(90deg, #f59e0b 0%, #eab308 100%) !important;
    color: #0f172a !important;
}

a.border-2.border-amber-400 {
    border-color: #fbbf24 !important;
    color: #fcd34d !important;
}

a.border-2.border-blue-400 {
    border-color: #60a5fa !important;
    color: #dbeafe !important;
}

/* Hover effects for CTAs */
a.bg-gradient-to-r.from-amber-500:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6) !important;
    transform: scale(1.05);
}

a.border-2.border-amber-400:hover,
a.border-2.border-blue-400:hover {
    background-color: rgba(30, 58, 138, 0.3) !important;
}

/* Blog Section Cards */
.bg-\[#3f9fc9\] {
    background-color: #3f9fc9 !important;
}

/* Ensure consistent card heights */
section#blog article {
    min-height: 400px;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Force blog card background color */
section#blog article.bg-\[#3f9fc9\] {
    background-color: #3f9fc9 !important;
}

/* Aprendiz Brand Colors */
:root {
    --aprendiz-primary: #3f9fc9;
    --aprendiz-secondary: #005477;
    --aprendiz-gold: #f59e0b;
}

.bg-aprendiz-primary {
    background-color: var(--aprendiz-primary) !important;
}

.bg-aprendiz-secondary {
    background-color: var(--aprendiz-secondary) !important;
}

.text-aprendiz-primary {
    color: var(--aprendiz-primary) !important;
}

.text-aprendiz-secondary {
    color: var(--aprendiz-secondary) !important;
}

.border-aprendiz-secondary {
    border-color: var(--aprendiz-secondary) !important;
}

/* Blog cards with secondary border */
section#blog article {
    border: 2px solid var(--aprendiz-secondary) !important;
}

/* Blog card meta text in secondary color */
section#blog article .text-slate-500 {
    color: var(--aprendiz-secondary) !important;
}

section#blog article .text-amber-600 {
    color: var(--aprendiz-secondary) !important;
}

section#blog article .text-amber-700 {
    color: var(--aprendiz-secondary) !important;
}

/* --- Single Post Image Refinements --- */
.prose img,
.entry-content img {
    margin-left: auto;
    margin-right: auto;
    display: block;
    border-radius: 1rem;
    /* Rounded corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: zoom-in;
    /* Indicate clickable */
}

/* Fix for figures/captions */
.prose figure,
.entry-content figure {
    margin-left: auto;
    margin-right: auto;
    display: table;
    /* Centers the figure if width is set, or use flex */
}

.prose figure img,
.entry-content figure img {
    margin-bottom: 0.5rem;
}

.prose figcaption,
.entry-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

/* --- Related Posts Equal Height Fix --- */
.grid.grid-cols-1.md\:grid-cols-3 {
    align-items: stretch;
    /* Stretch items to same height */
}

/* Ensure the card link wrapper fills the height */
.grid.grid-cols-1.md\:grid-cols-3>div,
.grid.grid-cols-1.md\:grid-cols-3>a {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure the inner article fills the height if wrapped */
.grid.grid-cols-1.md\:grid-cols-3 article {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Push footer/read-more to bottom if needed (optional) */
/* This assumes content-card.php structure allows flex-grow on content */

/* Tools section subtitle visibility fix */
section#herramientas p.max-w-2xl {
    color: #1e293b !important;
    font-weight: 500 !important;
}

/* (Removed Duplicate Menu Styles) */

/* Ensure mobile menu text is also visible */
#mobile-menu .menu-item a {
    color: #1f2937 !important;
    display: block;
    padding: 0.5rem;
}

/* FIX: Contact Form Button Gold Gradient */
.btn-gold {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #0f172a !important;
    /* Dark text */
    border: none !important;
}

.btn-gold:hover {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6) !important;
    transform: scale(1.05);
}

/* (Removed Duplicate Menu Styles 2) */

/* Magic Spiral Galaxy Animation */
.magic-spiral-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.magic-galaxy {
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg at 50% 50%,
            transparent 0%,
            rgba(251, 191, 36, 0.1) 10%,
            rgba(245, 158, 11, 0.6) 40%,
            rgba(251, 191, 36, 0.8) 50%,
            rgba(245, 158, 11, 0.6) 60%,
            rgba(251, 191, 36, 0.1) 90%,
            transparent 100%);
    border-radius: 50%;
    animation: rotateGalaxy 20s linear infinite;
    filter: blur(8px);
    opacity: 0.8;
    mask-image: radial-gradient(circle, transparent 20%, black 60%);
    -webkit-mask-image: radial-gradient(circle, transparent 20%, black 60%);
}

.magic-galaxy::after {
    content: '';
    position: absolute;
    inset: 20px;
    background: conic-gradient(from 180deg at 50% 50%,
            transparent 0%,
            rgba(59, 130, 246, 0.2) 20%,
            rgba(96, 165, 250, 0.5) 50%,
            rgba(59, 130, 246, 0.2) 80%,
            transparent 100%);
    border-radius: 50%;
    animation: rotateGalaxy 15s linear infinite reverse;
    mix-blend-mode: screen;
}

.magic-spiral-container::before {
    content: '✨';
    position: absolute;
    font-size: 3rem;
    filter: drop-shadow(0 0 10px #fbbf24);
    animation: floatStar 4s ease-in-out infinite;
    z-index: 10;
}

.magic-star-twinkle {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, .1) 2px, transparent 3px);
    background-size: 150px 150px, 100px 100px, 200px 200px;
    background-position: 0 0, 40px 60px, 130px 270px;
    animation: twinkle 5s linear infinite;
    opacity: 0.6;
    border-radius: 50%;
}

@keyframes rotateGalaxy {
    from {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    to {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes floatStar {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-20px) scale(1.2) rotate(45deg);
        opacity: 1;
    }
}

@keyframes twinkle {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Typography for Legal Pages (since prose plugin is missing) */
.prose h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #334155;
}

.prose p {
    margin-bottom: 1rem;
    color: #475569;
    line-height: 1.75;
}

.prose p a,
.prose li a {
    color: #2563eb;
    text-decoration: underline;
}

.prose p a:hover,
.prose li a:hover {
    color: #1d4ed8;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose strong {
    font-weight: 600;
    color: #1e293b;
}