/*
Theme Name: Arapy Theme
Theme URI: https://arapy.com
Author: William Chaparro
Author URI: https://arapy.com
Description: Tema multiprop��sito moderno y de alto rendimiento. Dise�0�9ado para centros de buceo y escalable a cualquier rubro. Optimizado para Envato ThemeForest.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arapy
Tags: multi-purpose, diving, portfolio, modern, clean, dark-mode, full-width-template, custom-logo, custom-menu, custom-colors, featured-images, theme-options, translation-ready, rtl-language-support, blog, e-commerce
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Variables globales)
   ============================================================ */
:root {
    --color-primary: #00c8e0;
    --color-primary-dark: #008ba3;
    --color-accent: #0075a8;
    --color-dark: #05101f;
    --color-dark-2: #0b1a30;
    --color-dark-3: #0a1628;
    --color-text: #e8edf5;
    --color-text-muted: rgba(232, 237, 245, 0.75);
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --header-height: 80px;
    --container-max: 1280px;
    --section-padding: 100px;
    --transition-fast: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   VARIABLES GLOBALES DEL TEMA
   ============================================================ */
:root {
    --light: #f0f4f8;
    --light-2: #e8edf5;
    --light-text: #0b1a2e;
    /* Azul marino muy oscuro para textos */
    --light-muted: rgba(11, 26, 46, 0.62);
    /* Gris azulado para p��rrafos */
    --light-border: rgba(11, 26, 46, 0.1);

    --indigo: #2b3a90;
    --indigo-dark: #1f2c70;
    /* <- Esto es lo que necesita tu Footer (.arapy-footer) */
    --indigo-light: #3a4ba8;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #fff;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.offcanvas-open {
    overflow: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

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

/* ============================================================
   UTILIDADES GLOBALES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: var(--section-padding) 0;
}

.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;
}

/* Revolution Slider no debe crear overflow */
.rev_slider_wrapper,
.rev_slider,
.tp-banner-container,
.tp-simpleresponsive {
    overflow: hidden !important;
    max-width: 100% !important;
}

/* ������ FIX GLOBAL: evitar scroll horizontal ������������������������������ */
html {
    overflow-x: hidden;
    /* scrollbar-gutter estabiliza el espacio del scrollbar
       para que no empuje contenido al aparecer/desaparecer */
    scrollbar-gutter: stable;
}

body {
    overflow-x: hidden;
    /* Ancho m��ximo igual al viewport, nunca m��s */
    max-width: 100vw;
}

/* ������ BOTONES ������������������������������������������������������������������������������������������ */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 36px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 2px;
    transition: background 0.3s ease, color 0.3s ease,
        border-color 0.3s ease, box-shadow 0.3s ease,
        transform 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--color-primary);
    color: #04090f;
    font-weight: 700;
}

.btn--primary:hover {
    background: #00b5cb;
    color: #04090f;
    box-shadow: 0 6px 22px rgba(0, 200, 224, 0.35);
}

.btn--outline {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 6px 18px rgba(0, 200, 224, 0.14);
}

.btn--dark {
    background: #04090f;
    color: var(--color-primary);
    font-weight: 700;
}

.btn--dark:hover {
    background: #0b1a2e;
    color: var(--color-primary);
    box-shadow: 0 6px 22px rgba(4, 9, 15, 0.28);
}

.btn--outline-dark {
    background: transparent;
    color: #04090f;
    border: 1.5px solid rgba(4, 9, 15, 0.38);
}

.btn--outline-dark:hover {
    border-color: #04090f;
    background: rgba(4, 9, 15, 0.07);
}

.btn--indigo {
    background: var(--indigo);
    color: #ffffff;
    font-weight: 700;
}

.btn--indigo:hover {
    background: var(--indigo-light);
    box-shadow: 0 6px 22px rgba(43, 58, 144, 0.35);
}

.btn--outline-indigo {
    background: transparent;
    color: var(--indigo);
    border: 1.5px solid rgba(43, 58, 144, 0.4);
}

.btn--outline-indigo:hover {
    background: rgba(43, 58, 144, 0.07);
    border-color: var(--indigo);
}

.btn--cta-xl {
    background: var(--color-primary);
    color: #04090f;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 3px;
    padding: 18px 52px;
}

.btn--cta-xl:hover {
    background: #00b5cb;
    box-shadow: 0 10px 34px rgba(0, 200, 224, 0.4);
    transform: translateY(-3px);
}

/* --- ESTILOS PARA P�0�9GINAS EST�0�9TICAS --- */
.page-hero {
    position: relative;
    padding: 120px 20px;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(4, 9, 30, 0.5), var(--indigo-dark));
    z-index: 1;
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

/* --- ARCHIVE COURSES --- */
.courses-archive-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 20px;
}

.category-block {
    margin-bottom: 80px;
}

.section-head-flex--archive {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 40px;
}

.cat-desc {
    max-width: 700px;
    color: var(--light-muted);
    margin-top: 10px;
    font-size: 1.1rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.cat-separator {
    border: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 60px 0;
}

/* Page Hero */
.page-hero--dark {
    background-color: var(--indigo-dark);
    padding: 150px 20px 100px;
    text-align: center;
    color: #fff;
}

.page-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.p-big-title span {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .btn--outline-dark {
        padding: 14px 10px;
    }
}

/* ������ CONTENEDOR PRINCIPAL DEL SHORTCODE ������ */
.arapy-shortcode-courses {
    padding: 40px 10px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ������ CABECERAS DE NIVEL (Iniciaci��n, Profesional, etc.) ������ */
.cat-block-sc {
    margin-bottom: 80px !important;
}

.cat-header-sc {
    position: relative;
    margin-bottom: 40px;
}

.cat-header-sc h2 {
    font-family: 'Montserrat', sans-serif;
    /* O la que uses en el tema */
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    font-size: 30px !important;
    font-weight: 900;
}

/* Subrayado decorativo para el nivel */
.cat-header-sc::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* ������ GRID DE TARJETAS ������ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* ������ TARJETA DE CURSO (CARD) ������ */
.course-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Imagen de la tarjeta */
.course-card-img {
    position: relative;
    transition: transform 0.6s ease;
    overflow: hidden;
}

.course-card:hover .course-card-img {
    filter: saturate(1.2);
}

/* Badge de Nivel sobre la imagen */
.course-card-level {
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* ������ CUERPO DE LA TARJETA ������ */
.course-card-body {
    padding: 25px;
    border: none !important;
    /* Quitamos el borde que pusimos inline si existe */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card-body h3 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin-top: 0;
    transition: color 0.3s ease;
}

.course-card:hover h3 {
    color: var(--color-primary);
}

.course-card-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

/* ������ FOOTER DE LA TARJETA (Precio y Bot��n) ������ */
.course-card-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.course-price {
    font-family: 'Montserrat', sans-serif;
    color: var(--indigo-dark);
}

/* Bot��n "Saber m��s" */
.course-link {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    /* M��s redondeado para un look moderno */
    transition: all 0.3s ease !important;
}

.course-link:hover {
    background: var(--color-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 200, 224, 0.3);
}

/* ������ RESPONSIVO ������ */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
        /* Una sola columna en m��vil */
        padding: 0 10px;
    }

    .about-hero-content h1 {
        font-size: 2.2rem;
    }
}

.page-content-section {
    background: #fff;
}

/* --- BLOG SINGLE: DISE�0�5O EDITORIAL --- */
.blog-single {
    background-color: #ffffff;
    padding-bottom: 100px;
}

/* Barra de progreso de lectura (Toque Pro) */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--color-primary);
    z-index: 9999;
}

/* Hero del Post */
.post-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    text-align: center;
}

.post-cat-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 200, 224, 0.1);
    color: var(--color-primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.post-header h1 {
    font-size: 3.5rem;
    color: var(--indigo-dark);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #a0aec0;
    font-size: 0.95rem;
}

/* Imagen Destacada */
.post-featured-image {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.post-featured-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* Cuerpo del Contenido */
.post-content-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.2rem;
    line-height: 1.9;
    color: #334155;
}

.post-content-wrap h2,
.post-content-wrap h3 {
    color: var(--indigo-dark);
    margin: 50px 0 25px;
    font-weight: 800;
}

.post-content-wrap p {
    margin-bottom: 30px;
}

/* Blockquote con estilo */
.post-content-wrap blockquote {
    border-left: 5px solid var(--color-primary);
    background: #f8fafd;
    padding: 40px;
    margin: 40px 0;
    border-radius: 0 15px 15px 0;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--indigo-dark);
}

/* Caja de Autor (Glassmorphism) */
.author-box {
    margin-top: 80px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 10px;
    color: var(--indigo-dark);
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .post-header h1 {
        font-size: 2.5rem;
    }

    .post-featured-image img {
        height: 350px;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* --- POST HERO (IMAGEN DESTACADA DE FONDO) --- */
.post-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Efecto Parallax sutil */
    color: #ffffff;
    padding: 100px 20px;
}

/* Capa oscura para legibilidad del texto */
.post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(4, 9, 15, 0.3) 0%, rgba(11, 32, 64, 0.85) 100%);
    z-index: 1;
}

.post-hero .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.post-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 20px 0 30px;
    letter-spacing: -1.5px;
    color: #ffffff;
}

.post-hero .post-cat-badge a {
    background: var(--color-primary);
    color: #04090f;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
}

.post-hero .post-meta {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.post-hero .post-meta .sep {
    opacity: 0.4;
}

/* --- AJUSTE DEL CONTENIDO --- */
.post-content-wrap {
    max-width: 800px;
    margin: -50px auto 0;
    /* Subimos un poco el contenido sobre el hero */
    background: #fff;
    padding: 60px 50px;
    border-radius: 20px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 40vh;
        padding: 80px 20px;
    }

    .post-content-wrap {
        margin-top: -30px;
        padding: 30px 20px;
    }
}