/*
Theme Name: Academic Handbook
Theme URI: https://ejemplo.com/academic-handbook
Description: Tema profesional estilo handbook universitario con diseño limpio y navegación lateral
Author: Tu Nombre
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: academic-handbook
*/

/* ===============================================
   RESET Y BASE
   =============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #002147;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #003d82;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===============================================
   HEADER
   =============================================== */

.site-header {
    background-color: #002147;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 0.25rem;
}

/* ===============================================
   NAVEGACIÓN PRINCIPAL
   =============================================== */

.main-navigation {
    background-color: #003d82;
    border-bottom: 3px solid #0056b3;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background-color: #0056b3;
    text-decoration: none;
}

/* ===============================================
   BREADCRUMBS
   =============================================== */

.breadcrumbs {
    background-color: #e8e8e8;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #ddd;
}

.breadcrumbs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumbs a {
    color: #002147;
}

.breadcrumbs span {
    margin: 0 0.5rem;
    color: #666;
}

/* ===============================================
   LAYOUT PRINCIPAL
   =============================================== */

.site-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===============================================
   SIDEBAR
   =============================================== */

.sidebar {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-right: 1px solid #ddd;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #002147;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #002147;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu .current-menu-item a {
    background-color: #e8f4f8;
    border-left-color: #002147;
    text-decoration: none;
    padding-left: 1rem;
}

.sidebar-menu .sub-menu {
    list-style: none;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.sidebar-menu .sub-menu a {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
}

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

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #002147;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.widget ul li:before {
    content: "›";
    position: absolute;
    left: 0;
    color: #002147;
    font-weight: bold;
}

/* ===============================================
   CONTENIDO PRINCIPAL
   =============================================== */

.main-content {
    padding: 2rem;
    min-height: 500px;
}

.page-title,
.entry-title {
    font-size: 2rem;
    font-weight: 600;
    color: #002147;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #002147;
}

.entry-content {
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.5rem;
    color: #002147;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.entry-content h3 {
    font-size: 1.25rem;
    color: #003d82;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.entry-content h4 {
    font-size: 1.1rem;
    color: #003d82;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.entry-content table th {
    background-color: #002147;
    color: #fff;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.entry-content table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.entry-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.entry-content blockquote {
    border-left: 4px solid #002147;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

/* Cajas informativas */
.info-box {
    background-color: #e8f4f8;
    border-left: 4px solid #0056b3;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

/* ===============================================
   NAVEGACIÓN DE POSTS
   =============================================== */

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

/* ===============================================
   FOOTER
   =============================================== */

.site-footer {
    background-color: #002147;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
}

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

.footer-widget a {
    color: #ccc;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #003d82;
    font-size: 0.875rem;
    color: #ccc;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 968px) {
    .site-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-title,
    .entry-title {
        font-size: 1.5rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   UTILIDADES
   =============================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

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

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   COMENTARIOS
   ============================================ */
.comments-area {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 2px solid var(--color-border);
}

.comments-title {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
}

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

.comment-list .comment {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--color-bg-alt);
  border-radius: 4px;
  border-left: 3px solid var(--color-accent);
}

.comment-list .children {
  list-style: none;
  padding-left: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.comment-author {
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.comment-author .avatar {
  border-radius: 50%;
  margin-right: var(--spacing-sm);
  vertical-align: middle;
}

.comment-meta {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}

.comment-meta a {
  color: var(--color-text-light);
  border: none;
}

.comment-content {
  margin-top: var(--spacing-sm);
  line-height: 1.7;
}

.reply {
  margin-top: var(--spacing-sm);
}

.reply a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comment-respond {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--color-bg-section);
  border-radius: 4px;
}

.comment-reply-title {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.comment-form {
  display: grid;
  gap: var(--spacing-md);
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
  display: flex;
  flex-direction: column;
}

.comment-form label {
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  max-width: 100%;
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-submit {
  margin-top: var(--spacing-sm);
}

.no-comments {
  font-style: italic;
  color: var(--color-text-light);
  padding: var(--spacing-md);
  background: var(--color-bg-alt);
  border-radius: 4px;
  text-align: center;
}

/* ============================================
   FORMULARIO DE BÚSQUEDA
   ============================================ */
.search-form {
  display: flex;
  gap: var(--spacing-xs);
  margin: var(--spacing-md) 0;
}

.search-form label {
  flex: 1;
  margin: 0;
}

.search-form .search-field {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.search-form .search-submit {
  padding: 0.75rem 1.5rem;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-form .search-submit:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   NAVEGACIÓN DE POSTS
   ============================================ */
.post-navigation,
.posts-navigation {
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-lg) 0;
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
}

.post-navigation .nav-links,
.posts-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.post-navigation .nav-previous,
.post-navigation .nav-next,
.posts-navigation .nav-previous,
.posts-navigation .nav-next {
  flex: 1;
}

.post-navigation .nav-next,
.posts-navigation .nav-next {
  text-align: right;
}

.post-navigation a,
.posts-navigation a {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-secondary);
  border: none;
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-alt);
  border-radius: 4px;
  transition: var(--transition);
}

.post-navigation a:hover,
.posts-navigation a:hover {
  background: var(--color-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-subtitle {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.nav-title {
  display: block;
  font-size: 1rem;
}

/* ============================================
   TAGS Y ENTRY FOOTER
   ============================================ */
.entry-footer {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.tags-links {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.tags-links a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin-right: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
  background: var(--color-bg-alt);
  border-radius: 20px;
  font-size: 0.875rem;
  border: none;
  transition: var(--transition-fast);
}

.tags-links a:hover {
  background: var(--color-secondary);
  color: white;
}
