/*
* AcademiaRNS - Elegant Theme
* Colors: White, Black, Red
* Style: Blur, Glassmorphism, Premium
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;600&display=swap');

:root {
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-text-muted: #555555;
    --color-accent: #e63946;
    /* Elegant Red */
    --color-accent-dark: #b91c29;
    --color-glass: rgba(240, 240, 240, 0.6);
    --color-glass-border: rgba(0, 0, 0, 0.1);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-container: 1200px;
    --radius-card: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: break-word;
    /* Prevents long words from breaking layout */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

main {
    flex: 1;
    width: 100%;
    /* Ensures main doesn't overflow */
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-text);
    font-weight: 400;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* --- Layout Utilities --- */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.text-center {
    text-align: center;
}

.text-highlight {
    color: var(--color-accent);
    font-style: italic;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white !important;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

.btn-glass {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-text);
}

.btn-glass:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* --- Background Effects (The Blur) --- */
.bg-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #e5e5e5 0%, transparent 70%);
    bottom: -10%;
    left: -20%;
    opacity: 0.3;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: 40%;
    left: 40%;
    opacity: 0.1;
}


/* --- Header --- */
header {
    padding: 2rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.logo span {
    color: var(--color-accent);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    position: relative;
    color: var(--color-text);
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: var(--color-accent);
}

/* Active link indicator */
nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
}

/* Header CTA Button - Pill Style from Image */
nav a.btn-nav-primary {
    background-color: var(--color-accent) !important;
    color: white !important;
    padding: 0.7rem 1.8rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    opacity: 1 !important;
    display: inline-block !important;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.5) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

nav a.btn-nav-primary:hover {
    background-color: var(--color-accent-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.6) !important;
}

nav a.btn-nav-primary::after {
    display: none !important;
    /* No underline for the button */
}

nav a.btn-nav-primary.active {
    color: white !important;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding-top: 180px !important;
    padding-bottom: 8rem !important;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content p {
    margin-left: auto;
    margin-right: auto;
}

/* --- Cards (Features / Philosophy) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.glass-card {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    padding: 2.5rem;
    border-radius: var(--radius-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Safari */
    transition: transform 0.4s ease, border-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(230, 57, 70, 0.3);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.glass-card .icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1;
    opacity: 0.8;
}

/* --- Stats Section --- */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 4rem 0;
    border-top: 1px solid var(--color-glass-border);
    border-bottom: 1px solid var(--color-glass-border);
    margin: 4rem 0;
}

.stat-item h4 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.stat-item p {
    font-size: 0.9rem;
    margin: 0;
}

/* --- Forms (Contact) --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-glass-border);
    color: var(--color-text);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* --- Comparison Table --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--color-glass);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--color-glass-border);
}

.comparison-table th,
.comparison-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-glass-border);
}

.comparison-table th {
    background: rgba(230, 57, 70, 0.1);
    color: var(--color-accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.highlight-row {
    background: rgba(230, 57, 70, 0.05);
}

/* --- FAQ Specific --- */
.faq-item {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-glass-border);
    padding-bottom: 2rem;
}

.faq-question {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.faq-answer {
    color: var(--color-text-muted);
    line-height: 1.8;
}

.faq-category {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--color-text);
    opacity: 0.5;
    margin: 4rem 0 2rem 0;
    border-left: 2px solid var(--color-accent);
    padding-left: 1rem;
}

.cta-box {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    padding: 3rem;
    border-radius: var(--radius-card);
    text-align: center;
    margin-top: 4rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--color-glass-border);
    padding: 4rem 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* --- Responsive --- */

/* Tablets and small laptops (up to 1024px) */
@media (max-width: 1024px) {
    :root {
        --spacing-container: 900px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero {
        padding-top: 150px !important;
        padding-bottom: 6rem !important;
    }
}

/* Tablets (up to 768px) */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    header {
        position: static;
        padding: 1.5rem 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }

    .nav-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        padding: 0;
    }

    nav a {
        font-size: 1rem;
    }

    .hero {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .section {
        padding: 4rem 0;
    }

    /* Column collapsing */
    #nosotros .container>div,
    section .container>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem !important;
    }

    /* Grids */
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        /* Smaller font to prevent cutting off words */
        word-break: break-word;
    }

    h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 1rem;
        /* Slightly less padding to give more room to content */
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-container {
        padding: 0 0.5rem;
    }

    .btn-nav-primary {
        width: 100% !important;
        text-align: center;
        margin-left: 0 !important;
        padding: 0.8rem 1rem !important;
        /* Ensure text fits */
    }

    /* Force all grids to single column */
    .card-grid,
    div[style*="display: grid"],
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Ensure flex containers that should stack do stack */
    div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Specific override for header nav which is already handled but good to be safe */
    nav ul {
        width: 100%;
    }

    header {
        width: 100%;
        overflow: hidden;
        /* Prevent header bursting */
    }

    .glass-card {
        padding: 1.5rem;
        /* Reduce padding inside cards */
    }

    .glass-card h2 {
        font-size: 1.8rem !important;
        /* Adjust card titles */
    }

    .hero {
        padding-top: 5rem !important;
        padding-bottom: 4rem !important;
    }

    .hero-content h1 {
        margin-bottom: 1rem;
    }

    .faq-question {
        font-size: 1.1rem;
    }

    .cta-box {
        padding: 2rem 1rem;
    }

    /* Orbs prevention */
    .bg-gradient-orb {
        display: none;
        /* Hide heavy blur effects on very small screens for performance and layout safety, or just opacity 0.2 */
        opacity: 0.2;
    }
}