/**
 * Twentu Public Website Styles
 * Mobile-first responsive design
 */

/* =========================================
   Variables
   ========================================= */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --text: #334155;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;
    --header-height: 72px;
}

/* =========================================
   Base Styles
   ========================================= */
.public-site {
    font-family: 'Gabarito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-toggler {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.navbar-toggler span {
    width: 24px;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s;
}

.navbar-toggler.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.navbar-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    list-style: none;
    margin: 0;
    flex-direction: column;
    gap: 10px;
}

.navbar-nav.show {
    display: flex;
}

.nav-link {
    display: block;
    padding: 10px 0;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-cta {
    margin-top: 10px;
}

.nav-cta .btn {
    width: 100%;
    justify-content: center;
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }

    .navbar-nav {
        display: flex;
        position: static;
        flex-direction: row;
        background: none;
        border: none;
        padding: 0;
        gap: 8px;
        align-items: center;
    }

    .nav-link {
        padding: 8px 16px;
    }

    .nav-cta {
        margin-top: 0;
        margin-left: 8px;
    }

    .nav-cta .btn {
        width: auto;
    }
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-alt);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* =========================================
   Main Content
   ========================================= */
.site-main {
    padding-top: var(--header-height);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 0 0 32px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 100px 0 120px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* =========================================
   Features Section
   ========================================= */
.features-section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    margin: 0 0 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin: 0 0 40px;
}

.features-grid {
    display: grid;
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: box-shadow 0.2s;
}

.feature-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 12px;
}

.feature-card p {
    color: var(--text-light);
    margin: 0;
}

@media (min-width: 768px) {
    .features-section {
        padding: 80px 0;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title {
        font-size: 2rem;
    }
}

/* =========================================
   Benefits Section
   ========================================= */
.benefits-section {
    padding: 60px 0;
    background: var(--bg-alt);
}

.benefits-content {
    max-width: 600px;
    margin: 0 auto;
}

.benefits-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 30px;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list svg {
    flex-shrink: 0;
    color: var(--success);
}

@media (min-width: 768px) {
    .benefits-section {
        padding: 80px 0;
    }

    .benefits-content h2 {
        font-size: 2rem;
    }
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.cta-content {
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.cta-content > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0 0 32px;
}

.cta-content .btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
}

.cta-content .btn-primary:hover {
    background: var(--bg-alt);
    border-color: var(--bg-alt);
}

.cta-note {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 16px 0 0;
}

@media (min-width: 768px) {
    .cta-section {
        padding: 100px 0;
    }

    .cta-content h2 {
        font-size: 2.5rem;
    }
}

/* =========================================
   CMS Page Content
   ========================================= */
.page-content {
    padding: 60px 0;
}

.cms-content {
    max-width: 800px;
    margin: 0 auto;
}

.cms-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 32px;
    text-align: center;
}

.content-body {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.content-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 48px 0 20px;
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 32px 0 16px;
}

.content-body p {
    margin: 0 0 20px;
}

.content-body ul, .content-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body a {
    color: var(--primary);
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

@media (min-width: 768px) {
    .page-content {
        padding: 80px 0;
    }

    .cms-content h1 {
        font-size: 2.5rem;
    }
}

/* Featured Image */
.featured-image {
    width: 100%;
    margin-bottom: 32px;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* =========================================
   Content Blocks
   ========================================= */

/* Content Block (Rich Text) */
.content-block {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.content-block h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 48px 0 20px;
}

.content-block h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 32px 0 16px;
}

.content-block p {
    margin: 0 0 20px;
}

.content-block ul, .content-block ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.content-block li {
    margin-bottom: 8px;
}

.content-block a {
    color: var(--primary);
}

.content-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

/* Respect Quill text alignment classes */
.content-block .ql-align-center,
.content-body .ql-align-center {
    text-align: center;
}

.content-block .ql-align-right,
.content-body .ql-align-right {
    text-align: right;
}

.content-block .ql-align-justify,
.content-body .ql-align-justify {
    text-align: justify;
}

/* Image Block */
.image-block {
    margin-bottom: 40px;
    text-align: center;
}

.image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.image-block .image-caption {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Carousel Block */
.carousel-block {
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    position: relative;
    width: 100%;
}

.carousel-slide {
    display: none;
    width: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: white;
}

@media (max-width: 768px) {
    .carousel-slide img {
        height: 250px;
    }
}

/* Video Block */
.video-block {
    margin-bottom: 40px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--gray-100);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Cards Block */
.cards-block {
    margin-bottom: 40px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

.card-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 8px;
}

.card-body p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* Card Links */
a.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.card-link:hover .card-body h3 {
    color: var(--primary);
}

/* =========================================
   Error Page
   ========================================= */
.error-page {
    padding: 100px 0;
    text-align: center;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}

.error-content h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 16px 0;
}

.error-content p {
    color: var(--text-light);
    margin: 0 0 32px;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    padding: 60px 0 30px;
    background: var(--secondary);
    color: white;
}

.footer-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .brand-logo {
    height: 32px;
    width: auto;
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}

.footer-brand p {
    margin: 12px 0 0;
    opacity: 0.7;
}

.site-footer h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px;
    opacity: 0.7;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: white;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.6;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}
