/* =============================================
   Teens Pulse Theme - Main Stylesheet
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --tp-primary: #ff4fa3;
    --tp-secondary: #7c4dff;
    --tp-accent: #41c9ff;
    --tp-highlight: #ffd84d;
    --tp-navy: #1f2340;
    --tp-bg: #f8f9ff;
    --tp-card: #ffffff;
    --tp-border: #e8eaf6;
    --tp-text: #1f2340;
    --tp-text-light: #6b7280;
    --tp-radius: 16px;
    --tp-radius-sm: 8px;
    --tp-radius-pill: 999px;
    --tp-shadow: 0 4px 24px rgba(31, 35, 64, 0.08);
    --tp-shadow-hover: 0 8px 32px rgba(31, 35, 64, 0.14);
    --tp-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--tp-text);
    background: var(--tp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    color: var(--tp-navy);
    font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1em;
}

/* --- Container --- */
.tp-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--tp-radius-pill);
    background: var(--tp-primary);
    color: #ffffff;
    cursor: pointer;
    transition: all var(--tp-transition);
    text-decoration: none;
    gap: 8px;
}

.tp-btn:hover {
    background: #e63d8f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--tp-shadow-hover);
}

.tp-btn-alt {
    background: transparent;
    color: var(--tp-primary);
    border-color: var(--tp-primary);
}

.tp-btn-alt:hover {
    background: var(--tp-primary);
    color: #ffffff;
}

.tp-btn-accent {
    background: var(--tp-accent);
    color: var(--tp-navy);
}

.tp-btn-accent:hover {
    background: #2eb8e6;
    color: var(--tp-navy);
}

/* --- Card --- */
.tp-card {
    background: var(--tp-card);
    border-radius: var(--tp-radius);
    padding: 28px;
    box-shadow: var(--tp-shadow);
    border: 1px solid var(--tp-border);
    transition: box-shadow var(--tp-transition), transform var(--tp-transition);
}

.tp-card:hover {
    box-shadow: var(--tp-shadow-hover);
    transform: translateY(-2px);
}

/* --- Header --- */
.tp-site-header {
    background: var(--tp-card);
    border-bottom: 1px solid var(--tp-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(31, 35, 64, 0.06);
}

.tp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.tp-site-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.tp-logo-wrap img {
    max-height: 60px;
    width: auto;
}

.tp-site-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--tp-navy);
    letter-spacing: -0.02em;
}

.tp-site-title:hover {
    color: var(--tp-primary);
}

.tp-site-description {
    font-size: 0.8rem;
    color: var(--tp-text-light);
    margin: 0;
    line-height: 1.3;
}

/* --- Navigation --- */
.tp-main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}

.tp-main-nav li {
    position: relative;
}

.tp-main-nav a {
    display: block;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--tp-text);
    border-radius: var(--tp-radius-pill);
    transition: all var(--tp-transition);
}

.tp-main-nav a:hover,
.tp-main-nav .current-menu-item > a {
    background: var(--tp-bg);
    color: var(--tp-primary);
}

/* Dropdown */
.tp-main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--tp-card);
    border-radius: var(--tp-radius-sm);
    box-shadow: var(--tp-shadow-hover);
    border: 1px solid var(--tp-border);
    padding: 8px 0;
    z-index: 100;
}

.tp-main-nav li:hover > .sub-menu {
    display: block;
}

.tp-main-nav .sub-menu a {
    padding: 10px 20px;
    border-radius: 0;
    font-size: 0.9rem;
}

.tp-main-nav .sub-menu a:hover {
    background: var(--tp-bg);
}

/* Nav Toggle (mobile) */
.tp-nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tp-text);
    cursor: pointer;
    transition: all var(--tp-transition);
    flex-shrink: 0;
}

.tp-nav-toggle:hover {
    border-color: var(--tp-primary);
    color: var(--tp-primary);
}

/* --- Main Content --- */
.tp-site-content {
    min-height: 60vh;
    padding: 40px 0;
}

.tp-main-content {
    padding: 40px 0;
}

/* --- Hero Section --- */
.tp-hero-section {
    background: linear-gradient(135deg, var(--tp-navy) 0%, #2d2f5e 50%, #3a2d6e 100%);
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.tp-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 79, 163, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tp-hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(65, 201, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tp-hero-copy {
    color: #ffffff;
}

.tp-hero-kicker {
    display: inline-block;
    background: rgba(255, 79, 163, 0.2);
    color: var(--tp-primary);
    padding: 6px 18px;
    border-radius: var(--tp-radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.tp-hero-copy h1 {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.tp-hero-copy p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 480px;
    line-height: 1.7;
}

.tp-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tp-hero-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tp-radius);
    padding: 32px;
    color: #ffffff;
}

.tp-hero-card h3 {
    color: var(--tp-highlight);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

/* --- Home Sections --- */
.tp-home-section {
    padding: 60px 0;
}

.tp-home-section + .tp-home-section {
    border-top: 1px solid var(--tp-border);
}

.tp-section-title {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    padding-bottom: 12px;
}

.tp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--tp-primary), var(--tp-accent));
    border-radius: 2px;
}

.tp-home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* --- Post List --- */
.tp-post-list {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

/* --- Post Card --- */
.tp-post-card .tp-entry-header {
    margin-bottom: 16px;
}

.tp-entry-title a {
    color: var(--tp-navy);
    transition: color var(--tp-transition);
}

.tp-entry-title a:hover {
    color: var(--tp-primary);
}

.tp-entry-meta {
    font-size: 0.85rem;
    color: var(--tp-text-light);
    display: flex;
    gap: 8px;
    align-items: center;
}

.tp-entry-content p:last-child {
    margin-bottom: 0;
}

/* --- Page Card --- */
.tp-page-card .tp-entry-title {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tp-border);
}

/* --- Single Card --- */
.tp-single-card .tp-entry-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--tp-border);
}

.tp-single-card .tp-entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* --- Page Header --- */
.tp-page-header {
    margin-bottom: 32px;
    text-align: center;
}

.tp-page-header h1 {
    margin-bottom: 8px;
}

/* --- Pagination --- */
.pagination, .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 24px 0;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--tp-radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--tp-transition);
}

.pagination a,
.nav-links a {
    background: var(--tp-card);
    color: var(--tp-text);
    border: 1px solid var(--tp-border);
}

.pagination a:hover,
.nav-links a:hover {
    background: var(--tp-primary);
    color: #ffffff;
    border-color: var(--tp-primary);
}

.pagination .current,
.nav-links .current {
    background: var(--tp-primary);
    color: #ffffff;
    border: 1px solid var(--tp-primary);
}

/* --- Sidebar --- */
.tp-sidebar {
    padding: 32px 0;
}

.tp-widget {
    margin-bottom: 24px;
}

.tp-widget-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--tp-border);
}

/* --- Footer --- */
.tp-site-footer {
    background: var(--tp-navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
    margin-top: 40px;
}

.tp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.tp-footer-grid h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.tp-footer-grid p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.tp-site-footer ul {
    list-style: none;
}

.tp-site-footer ul li {
    margin-bottom: 8px;
}

.tp-site-footer ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color var(--tp-transition);
}

.tp-site-footer ul a:hover {
    color: var(--tp-accent);
}

.tp-footer-copy {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .tp-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tp-hero-section {
        padding: 60px 0;
    }

    .tp-hero-card {
        max-width: 480px;
    }

    .tp-home-grid {
        grid-template-columns: 1fr;
    }

    .tp-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .tp-nav-toggle {
        display: block;
    }

    .tp-main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--tp-card);
        border-bottom: 1px solid var(--tp-border);
        box-shadow: var(--tp-shadow);
        padding: 16px 20px;
        z-index: 999;
    }

    .tp-main-nav.is-open {
        display: block;
    }

    .tp-main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .tp-main-nav a {
        padding: 12px 16px;
        width: 100%;
        border-radius: var(--tp-radius-sm);
    }

    .tp-main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: var(--tp-bg);
        border-radius: var(--tp-radius-sm);
        margin-top: 4px;
    }

    .tp-hero-section {
        padding: 48px 0;
    }

    .tp-hero-copy h1 {
        font-size: 1.8rem;
    }

    .tp-hero-actions {
        flex-direction: column;
    }

    .tp-hero-actions .tp-btn {
        text-align: center;
    }

    .tp-home-section {
        padding: 40px 0;
    }

    .tp-card {
        padding: 20px;
    }

    .tp-header-inner {
        flex-wrap: wrap;
    }

    .tp-site-content {
        padding: 24px 0;
    }
}

@media (max-width: 480px) {
    .tp-container {
        padding: 0 16px;
    }

    .tp-hero-copy h1 {
        font-size: 1.5rem;
    }

    .tp-hero-copy p {
        font-size: 1rem;
    }

    .tp-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* --- WordPress Core Overrides --- */
.wp-block-button .wp-block-button__link {
    border-radius: var(--tp-radius-pill) !important;
    font-weight: 600;
    transition: all var(--tp-transition);
}

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--tp-shadow-hover);
}

.wp-block-quote {
    border-left: 4px solid var(--tp-primary);
    padding: 16px 24px;
    background: var(--tp-bg);
    border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0;
    margin: 24px 0;
}

.wp-block-pullquote {
    border-color: var(--tp-primary);
}

.wp-block-separator {
    border-top: 2px solid var(--tp-border);
    margin: 40px auto;
    max-width: 200px;
}

/* --- Elementor Compatibility --- */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}

.elementor-widget-container {
    word-wrap: break-word;
}

/* --- Accessibility --- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus visible for keyboard users */
:focus-visible {
    outline: 3px solid var(--tp-accent);
    outline-offset: 2px;
}
