/* 
 * base.css
 * Estilos base y reset para Bhava Nirodha Nilaya
 * FONDO CLARO con colores ocre destacados
 */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:before,
*:after {
    box-sizing: border-box;
}

/* HTML y Body - FONDO BLANCO */
html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--white); /* FONDO BLANCO */
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color); /* Títulos en ocre oscuro */
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-base);
    color: var(--text-color); /* Texto en gris oscuro */
}

/* Enlaces */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover,
a:focus {
    color: var(--primary-color);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Listas */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-sm);
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

/* Elementos de formulario */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--white);
    transition: border-color var(--transition-normal);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}

/* Elementos multimedia */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Elementos estructurales */
main {
    display: block;
}

section {
    margin-bottom: var(--spacing-xxl);
}

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: var(--z-tooltip);
    border-radius: var(--border-radius-sm);
    font-weight: bold;
    transition: top var(--transition-normal);
}

.skip-link:focus {
    top: 6px;
}

/* Estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

/* Estados de error */
.error {
    color: var(--error-color);
    font-weight: bold;
}

.success {
    color: var(--success-color);
    font-weight: bold;
}

/* Utilidades básicas */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

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

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}