/* style.css - Customized to match mockup look and feel */
@font-face {
  font-family: 'Borna';
  src: url('../assets/fonts/Borna-Regular.woff2') format('woff2'),
    url('../assets/fonts/Borna-Regular.woff') format('woff'),
    url('../assets/fonts/Borna-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Borna';
  src: url('../assets/fonts/Borna-Bold.woff2') format('woff2'),
    url('../assets/fonts/Borna-Bold.woff') format('woff'),
    url('../assets/fonts/Borna-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #fff;
  --bg: #f2f2f2;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #ff6b8a;
  --accent-hero: #ff6b8a;
  --accent-1: #ff6b8a;
  /* purple */
  --accent-2: #06b6d4;
  /* teal */
  --whc-bg: #1f3a5f;
  --card-bg: #2A4A7A;
  --accent-grad: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  --maxw: 1200px;
  --header-height: 72px;
  /* altura por defecto del header (ajusta si quieres) */

  /* Accessibility Variables */
  --acc-text-color: #0f172a;
  --acc-bg-color: var(--bg);
  --acc-card-color: var(--card);
  --acc-link-color: var(--accent);
}

* {
  box-sizing: border-box
}

body {
  font-family: 'Borna', Inter, Arial, Helvetica, sans-serif;
  background: var(--acc-bg-color);
  color: var(--acc-text-color);
  margin: 0;
  line-height: 1.5;
  padding-top: 80px;
  /* ajusta según la altura del header */
  transition: background-color 0.3s, color 0.3s;
}

container {
  max-width: 1200px;
  margin: 72px auto;
  padding: 0 16px
}

.custom-link {
  color: var(--acc-link-color);
  /* hereda el color del texto normal */
  text-decoration: none;
  /* quita el subrayado */
  cursor: pointer;
  /* sigue mostrando la mano al pasar por encima */
}

.custom-link:hover {
  background-color: #fff;
  color: #1f3a5f;
}

/* -------------------------
    BUTTONS
------------------------- */
.language-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.language-main-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-main-button img {
    width: 30px;
    height: 20px;
}

.language-options {
    display: none;
    position: absolute;
    bottom: 50px;
    right: 0;
    background-color: #f9f9f9;
    min-width: 80px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 5px;
    padding: 5px 0;
}

.language-options.show {
    display: block;
}

.language-option {
    color: black;
    padding: 8px 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.language-option img {
    width: 25px;
    height: 17px;
}

.language-option:hover {
    background-color: #ddd;
}

/* -------------------------
    ACCESSIBILITY STYLES
------------------------- */
.accessibility-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    z-index: 1001;
}

.accessibility-button img {
    width: 40px;
    height: 40px;
}

.accessibility-panel {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    flex-direction: column;
    gap: 15px;
}

.accessibility-panel.active {
    display: flex;
}

.accessibility-panel h4 {
    margin-bottom: 10px;
    color: var(--green-aso);
}

.accessibility-panel button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background-color: var(--whc-bg);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
    letter-spacing: normal;
}

.accessibility-panel button:hover {
    background-color: var(--card-bg);
    transform: none;
}

.accessibility-panel button.active {
    background-color: var(--accent-2);
}

/* -------------------------
    ACCESSIBILITY OVERRIDES
    (Used by JS to apply classes to <body>)
------------------------- */

/* A. Increased Font Size Mode */
body.font-large {
    font-size: 1.25em;
    line-height: 1.8;
}

/* B. High Contrast Mode (Dark Mode) */
body.high-contrast {
    --acc-text-color: #fff;
    --acc-bg-color: #000;
    --acc-card-color: #111;
    --acc-link-color: #ffeb3b; /* Bright, high-contrast link color */
}

body.high-contrast .accessibility-panel {
    background-color: #111;
    border-color: #ffeb3b;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.high-contrast .accessibility-panel button {
    background-color: #333;
    color: #fff;
    border: 1px solid #ffeb3b;
}

body.high-contrast .accessibility-panel button:hover {
    background-color: #555;
}

body.high-contrast .accessibility-panel button.active {
    background-color: #ffeb3b;
    color: #000;
}

/* C. White Text Mode (Inverted Light Mode/Agnostic) */
body.white-text-mode {
    --acc-text-color: #fff;
    --acc-bg-color: #1f3a5f; /* Using one of the existing dark variables */
    --acc-card-color: #2A4A7A; /* Using another existing dark variable */
    --acc-link-color: #06b6d4; /* Teal for contrast */
}

body.white-text-mode .accessibility-panel {
    background-color: #2A4A7A;
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

body.white-text-mode .accessibility-panel button {
    background-color: #4A6A9A;
    color: #fff;
    border: 1px solid #06b6d4;
}

body.white-text-mode .accessibility-panel button:hover {
    background-color: #6A8Aba;
}

body.white-text-mode .accessibility-panel button.active {
    background-color: #06b6d4;
    color: #fff;
}


/* D. Readable Font Mode (Switches to a more universal, readable sans-serif) */
body.readable-font {
    font-family: Arial, Verdana, "Helvetica Neue", sans-serif !important;
    /* Reset custom font but allow fallback */
}


/* Apply the colors using the variables (needed for elements other than body) */
/* This is a simple example, you might need to apply these variables to specific elements like .card, .header, etc., in your other CSS files */
/* In this styles.css: */
.language-options {
    background-color: var(--acc-card-color);
    /* Update language options background */
}

.language-option {
    color: var(--acc-text-color);
}

.language-option:hover {
    background-color: rgba(var(--acc-link-color), 0.2);
}

/* Media queries for responsiveness */
/* Very small devices (phones, 620px and down) */
@media (max-width: 620px) {
    .accessibility-button {
        bottom: 10px;
        left: 10px;
    }

    .accessibility-button img {
        width: 30px;
        height: 30px;
    }

    .accessibility-panel {
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
    }
}


/* Media query for small screens (768px and below) */
@media (max-width: 768px) {
    .language-button img,
    .accessibility-button img
    {
        opacity: 70%;
    }
}