/*
Theme Name: DrcatherinecameronNuoto Hub
Author: DrcatherinecameronNuoto Media Group
Description: Il portale d'avanguardia per il nuoto internazionale. Analisi biomeccanica, cronache dalle vasche e classifiche mondiali.
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=Jost:wght@300;400;600&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* Ocean Deep Palette (Fluid & Professional) */
    --primary: #0077B6;        /* Pacific Blue */
    --secondary: #03045E;      /* Midnight Deep */
    --accent: #ADE8F4;         /* Shimmering Aqua */
    --black: #02044A;
    --white: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.1);
    --text-main: #E9ECEF;
    --text-muted: #90E0EF;
    --border: rgba(173, 232, 244, 0.2);
    
    --container-width: 1200px;
    --content-width: 850px;
    --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);

    /* Adaptive Design Variables */
    --section-pad: clamp(4rem, 10vw, 10rem);
    --hero-pad: clamp(5rem, 15vw, 8rem);
}

/* Global Reset - Axis V-A: Glassmorphism / Fluidity */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--secondary);
    color: var(--text-main);
    font-family: 'Jost', sans-serif;
    line-height: 1.7;
}

/* Fluid Typography - Rule 14 & Rule 22 */
h1, h2, h3, .logo, .footer-logo {
    overflow-wrap: break-word;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
}

/* Rule 14: Safe h1 threshold 1.8rem */
h1 { font-size: clamp(1.8rem, 10vw, 7rem); line-height: 0.9; color: var(--white); margin-bottom: 2rem; text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 7vw, 4.5rem); line-height: 1; color: var(--accent); margin-bottom: 3.5rem; text-transform: uppercase; }
h3 { font-size: clamp(1.3rem, 4vw, 2.2rem); line-height: 1.2; color: var(--white); }

.mono { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem; }

img { max-width: 100%; height: auto; display: block; filter: brightness(0.9) contrast(1.1); }

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* DNA N-E: Minimal Top-bar Header */
.site-header {
    background: rgba(3, 4, 94, 0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo span { color: var(--accent); font-weight: 400; opacity: 0.7; }

.main-nav ul { display: flex; gap: 3rem; list-style: none; }
.main-nav a { 
    font-weight: 600; font-size: 0.8rem; color: var(--white); 
    text-transform: uppercase; letter-spacing: 0.1em;
}
.main-nav a:hover { color: var(--accent); }

.nav-toggle { display: none; }

/* DNA H-E: Compact Hero with Image Background (Rule 2) */
.hero-nuoto {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background-color: var(--secondary);
    position: relative;
    overflow: hidden;
}

.hero-nuoto .hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}
.hero-nuoto .hero-bg-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.5;
}
.hero-nuoto .hero-bg-img::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, var(--secondary) 20%, transparent 80%);
}

.hero-nuoto::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 150px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2303045E" fill-opacity="1" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,144C672,139,768,181,864,181.3C960,181,1056,139,1152,122.7C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover; background-position: bottom;
    z-index: 3;
}

.hero-content { position: relative; z-index: 4; max-width: 800px; }

.btn-fluid {
    display: inline-block;
    padding: 1.2rem 4rem;
    background: var(--accent);
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px !important;
}
.btn-fluid:hover { background: var(--white); transform: scale(1.05); }

/* DNA D-A: Diagonal Sections */
.skewed-section {
    position: relative;
    padding: var(--section-pad) 0;
    margin-top: -5vw;
    background: var(--secondary);
    z-index: 3;
}

/* DNA F-C: Accordion (Vantaggi) */
.nuoto-accordion {
    padding: var(--section-pad) 0;
    background: var(--black);
}
.acc-item {
    background: var(--bg-glass);
    margin-bottom: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 15px !important;
}
.acc-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.acc-header h3 { color: var(--accent); }
.acc-header::after { content: '↓'; color: var(--accent); font-size: 1.5rem; transition: var(--transition); }
.acc-item.is-active .acc-header::after { transform: rotate(180deg); }
.acc-content { padding-top: 2rem; color: var(--text-muted); font-size: 1.1rem; display: none; }

/* DNA U-D: Photo Strips (Gallery) */
.photo-strip {
    display: flex;
    overflow: hidden;
    gap: 1rem;
    padding: 2rem 0;
    background: var(--secondary);
}
.photo-strip img {
    height: 300px;
    width: 400px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 15px !important;
    opacity: 0.6;
    transition: var(--transition);
}
.photo-strip img:hover { opacity: 1; transform: scale(1.05); }

/* Posts Grid - Axis C-B: Horizontal Cards */
.posts-section { padding: var(--section-pad) 0; background: var(--secondary); }
.nuoto-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 8rem; }

.post-card-horiz {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 20px !important;
    transition: var(--transition);
}
.post-card-horiz:hover { background: rgba(255,255,255,0.15); transform: translateY(-5px); }
.post-card-horiz .thumb { height: 250px; overflow: hidden; border-radius: 10px !important; }
.post-card-horiz .thumb img { width: 100%; height: 100%; object-fit: cover; border: none; }
.post-card-horiz h3 { font-size: 2rem; margin-bottom: 1.5rem; }

.btn-read {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination - Fluid Style */
.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 8rem; }
.pagination .page-numbers {
    padding: 1rem 2rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--white);
    border-radius: 30px !important;
    font-weight: 600;
}
.pagination span.current, .pagination a:hover { background: var(--primary); border-color: var(--primary); }

/* DNA FT-C: Three-column Footer */
.site-footer {
    background: var(--black);
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: 6rem;
}
.footer-logo { font-size: 2rem; color: var(--white); margin-bottom: 2rem; overflow-wrap: anywhere; }
.footer-logo span { color: var(--accent); }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; max-width: 100%; overflow-wrap: break-word; }

.footer-title { font-family: 'Syne'; font-size: 1.2rem; color: var(--accent); margin-bottom: 2rem; text-transform: uppercase; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1rem; }
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; font-size: 0.75rem; color: rgba(255,255,255,0.3);
}

/* Rule 22: Content Protocol */
.post-main { max-width: var(--content-width); margin: 8rem auto; padding: 0 2rem; }
.post-header { margin-bottom: 6rem; }
.post-meta { color: var(--accent); font-weight: 700; margin-bottom: 1.5rem; display: block; font-family: 'Syne'; }
.post-content h2, .post-content h3 { margin: 4rem 0 2rem; color: var(--accent); border-left: 5px solid var(--primary); padding-left: 1.5rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 4rem 0; background: var(--bg-glass); border: 1px solid var(--border); }
.post-content th { background: var(--primary); color: var(--white); padding: 1.5rem; }
.post-content td { padding: 1.5rem; border-bottom: 1px solid var(--border); }

/* Responsive */
@media (max-width: 1024px) {
    .nuoto-grid { grid-template-columns: 1fr; }
    .post-card-horiz { grid-template-columns: 300px 1fr; }
}

@media (max-width: 768px) {
    .site-header { padding: 1.5rem 0; }
    .header-inner { flex-direction: row; justify-content: space-between; }
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: absolute; top: 100%; left: 0; width: 100%; background: var(--secondary); padding: 3rem 2rem; border-bottom: 1px solid var(--accent);
    }
    .main-nav ul { flex-direction: column; gap: 2rem; align-items: center; }
    .nav-toggle { display: flex; flex-direction: column; gap: 6px; width: 30px; background: none; border: none; cursor: pointer; }
    .nav-toggle span { width: 100%; height: 2px; background: var(--white); }
    
    .post-card-horiz { grid-template-columns: 1fr; padding: 1.5rem; }
    .post-card-horiz .thumb { height: 200px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
