/*
Theme Name: Blog Psicointrega Premium
Theme URI: https://psicointregra.com
Author: Fernando Frontend Engineer
Author URI: https://psicointregra.com
Description: Tema editorial premium para blogs de psicología. Enfoque en legibilidad, calma y SEO. Incluye sistema de React integrado con WordPress.
Version: 1.1.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psicointregra
Tags: blog, psychology, mental-health, clean, light, serif, editorial, premium
*/

/* --- Base Reset & Core --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #fcfcf9;
    color: #1c1917;
    scroll-behavior: smooth;
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
.serif {
    font-family: 'Playfair Display', serif;
}

/* --- Typography & Prose (Blog Content) --- */
.prose {
    font-size: 17px;
    line-height: 1.7;
}

.prose p {
    margin-bottom: 1.5em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-family: 'Playfair Display', serif;
    color: #1c1917;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h1 {
    font-size: 2.2em;
    line-height: 1.2;
}

.prose h2 {
    font-size: 1.8em;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.5em;
    line-height: 1.4;
}

.prose h4 {
    font-size: 1.25em;
    line-height: 1.5;
}

.prose ul,
.prose ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose strong {
    font-weight: 600;
    color: #0c0a09;
}

.prose a {
    color: #0d9488;
    text-decoration: underline;
}

.prose a:hover {
    color: #0f766e;
}

/* --- Components & UI --- */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

::selection {
    background-color: #0d9488;
    color: white;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f8f6;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 50;
    border-radius: 8px;
    border: 1px solid #e7e5e4;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    top: 100%;
    left: 0;
    margin-top: 0;
}

.dropdown::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    z-index: 45;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #44403c;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 51;
}

.dropdown-content a:hover {
    background-color: #f1f5f9;
    color: #0d9488;
}

/* Search Expandable */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    padding: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    border-radius: 9999px;
    outline: none;
}

.search-container:focus-within .search-input,
.search-input:not(:placeholder-shown),
.search-input.active {
    width: 180px;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    opacity: 1;
    border-color: #d6d3d1;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.search-button {
    z-index: 10;
    transition: transform 0.2s;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-button:hover {
    transform: scale(1.2);
}

@media (min-width: 768px) {
    .search-input {
        width: 140px;
        padding: 0.5rem 1rem;
        padding-right: 2.5rem;
        opacity: 1;
        border-color: #d6d3d1;
    }

    .search-container:focus-within .search-input {
        width: 200px;
    }
}

/* Floating Navigation */
.mobile-float-nav {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.float-item-trigger {
    background: #0d9488;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    cursor: pointer;
}

.float-item-trigger:active {
    transform: scale(0.9);
}

.float-item-trigger svg {
    width: 28px;
    height: 28px;
}

/* Mobile Drawer */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    background: white;
    z-index: 101;
    transform: translateX(100%);
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.1);
}

#mobile-menu.open {
    transform: translateX(0);
}

#menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* WP Blocks Compatibility */
.wp-block-post-content {
    max-width: 800px;
    margin: 0 auto;
}