/**
 * YesPablo Theme Styles
 * 
 * This file contains the core design system based on the React prototype.
 * Tailwind CSS classes are included via tailwind.css
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* WordPress Core Alignment */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

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

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

/* WordPress Image Classes */
img.alignleft,
img.alignright,
img.aligncenter {
    max-width: 100%;
    height: auto;
}

/* Custom Logo Styling */
.custom-logo-link {
    display: inline-block;
}

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

@media (min-width: 768px) {
    .custom-logo {
        height: 3rem;
    }
}

/* Prose Styles for Content */
.prose {
    color: hsl(264, 8%, 12%);
    max-width: 65ch;
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose h2 {
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3333;
}

.prose h3 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.prose a {
    color: hsl(264, 85%, 58%);
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: hsl(264, 85%, 48%);
}

.prose ul,
.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

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

.prose img {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: hsl(264, 10%, 42%);
    border-left: 0.25rem solid hsl(264, 85%, 58%);
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6rem;
    margin-bottom: 1.6rem;
    padding-left: 1rem;
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    background-color: white;
    border: 1px solid hsl(264, 6%, 92%);
    color: hsl(264, 8%, 12%);
}

.pagination .page-numbers:hover {
    background-color: hsl(264, 8%, 92%);
}

.pagination .page-numbers.current {
    background-color: hsl(264, 85%, 58%);
    border-color: hsl(264, 85%, 50%);
    color: white;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: hsl(264, 4%, 98%);
    border-radius: 0.5rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: hsl(264, 10%, 42%);
    margin-bottom: 1rem;
}

.comment-content p {
    margin: 0.5rem 0;
}

.comment-reply-link {
    font-size: 0.875rem;
    color: hsl(264, 85%, 58%);
    text-decoration: none;
    font-weight: 500;
}

.comment-reply-link:hover {
    color: hsl(264, 85%, 48%);
}

/* Widget Styling */
.widget {
    margin-bottom: 2rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

.widget a {
    color: hsl(264, 10%, 42%);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.widget a:hover {
    color: hsl(264, 8%, 12%);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form label {
    flex: 1;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(264, 6%, 92%);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: hsl(264, 75%, 42%);
    box-shadow: 0 0 0 3px hsl(264, 75%, 42%, 0.1);
}

.search-form button {
    padding: 0.5rem 1rem;
    background-color: hsl(264, 85%, 58%);
    border: 1px solid hsl(264, 85%, 50%);
    color: white;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form button:hover {
    background-color: hsl(264, 85%, 52%);
}

/* Universal Header Spacing Fix */
/* Ensures all content starts below the fixed header site-wide */
.site-content {
    padding-top: 6rem; /* 96px - mobile header (64px) + breathing room (32px) */
}

@media (min-width: 768px) {
    .site-content {
        padding-top: 7rem; /* 112px - desktop header (80px) + breathing room (32px) */
    }
}

/* Account for WordPress admin bar when logged in */
body.admin-bar .site-content {
    padding-top: calc(6rem + 46px); /* Mobile: 96px + admin bar (46px below 782px) */
}

@media (min-width: 782px) {
    body.admin-bar .site-content {
        padding-top: calc(7rem + 32px); /* Desktop: 112px + admin bar (32px at/above 782px) */
    }
}

/* Remove site-content padding on homepage - hero section handles its own spacing */
body.home .site-content {
    padding-top: 0;
}

/* But restore admin bar offset for logged-in users on homepage */
body.home.admin-bar .site-content {
    padding-top: 46px; /* Mobile admin bar height */
}

@media (min-width: 782px) {
    body.home.admin-bar .site-content {
        padding-top: 32px; /* Desktop admin bar height */
    }
}

/* Special Styling for Application Form Page (solicitud) */
/* This removes width constraints and prose styling to allow embedded React apps to display properly */
body.page-solicitud .prose {
    max-width: none;
}

body.page-solicitud article {
    padding: 0;
    margin: 0;
}

body.page-solicitud .prose p,
body.page-solicitud .prose h2,
body.page-solicitud .prose h3 {
    margin: 0;
}

/* Utility Classes */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
