/* ==========================================
   PROYECTO FTP - ESTILO INDEPENDIENTE
   Clara Montaño Rodríguez
   Compatible con style.css global
========================================== */

/* ======= Reset local para evitar conflicto con el style.css principal ======= */
body.ftp-page section,
body.ftp-page h1,
body.ftp-page h2,
body.ftp-page h3,
body.ftp-page h4,
body.ftp-page p,
body.ftp-page button,
body.ftp-page a,
body.ftp-page details,
body.ftp-page summary,
body.ftp-page ol,
body.ftp-page ul,
body.ftp-page li,
body.ftp-page pre,
body.ftp-page code {
    all: unset;
    display: revert;
    box-sizing: border-box;
}

/* ======= Variables ======= */
:root {
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-2: #273449;
    --border: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --accent: #2dd4bf;
    --accent-hover: #14b8a6;
    --code-bg: #0b1120;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 12px;
    --maxw: 1100px;
}

/* ======= Estructura general ======= */
body.ftp-page {
    font-family: 'Inter', sans-serif;
    background: var(--bg) url('images/fondo.png') no-repeat center center fixed;
    background-size: cover;
    background-blend-mode: darken;
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrap {
    max-width: var(--maxw);
    margin: 40px auto 80px;
    padding: 0 20px;
}

/* ======= Hero ======= */
.hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    max-width: 900px;
    margin: 4rem auto 3rem;
    padding: 0 1rem;
    gap: 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.hero p {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero code {
    color: #2dd4bf;
    font-weight: 600;
    font-family: Consolas, monospace;
}

/* ======= Botones ======= */
.btn {
    display: inline-block;
    background: #2dd4bf;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem 1.8rem;
    border-radius: 0.75rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(45, 212, 191, 0.3);
    transition: all 0.25s ease;
}

.btn:hover {
    background: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.4);
}

/* ======= Acordeones ======= */
.accordion {
    margin-top: 30px;
    display: grid;
    gap: 16px;
}

details {
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(180deg, #1e293b, #182133);
    transition: all 0.25s ease;
}

summary::-webkit-details-marker {
    display: none;
}

summary:hover {
    background: rgba(45, 212, 191, 0.1);
}

.caret {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
    transition: transform 0.25s ease;
}

details[open] .caret {
    transform: rotate(45deg);
}

.panel {
    padding: 16px 20px 20px;
    background: var(--panel-2);
    border-top: 1px solid var(--border);
    color: var(--text-dim);
}

/* ======= Tipografía ======= */
h2,
h3,
h4 {
    color: var(--accent);
}

p {
    margin-bottom: 1rem;
}

/* ======= Código ======= */
pre {
    margin: 14px 0;
    padding: 12px;
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    border: 1px solid var(--border);
}

code {
    font-family: Consolas, monospace;
    color: var(--accent);
}

/* ======= Imágenes ======= */
img {
    display: block;
    margin: 12px auto;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

/* ======= Volver ======= */
.volver {
    display: inline-block;
    padding: 12px 20px;
    margin-top: 50px;
    background: var(--accent);
    color: #0f172a;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.volver:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ======= Footer ======= */
footer {
    text-align: center;
    color: var(--text-dim);
    margin-top: 50px;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ======= Responsive ======= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    summary {
        font-size: 0.95rem;
    }

    .btn,
    .volver {
        width: 100%;
        text-align: center;
    }
}