/* components.css
   Sections reused across pages: hero, benefits, results, product demo,
   testimonials, FAQ, content blocks, integrations, comparison table.
   Loaded on every page. */

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 120px;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, var(--light) 100%);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.08) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    z-index: 1;
}

.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    border: 1px solid var(--primary);
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    border-radius: 20px;
    animation: rotate 20s linear infinite;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 80%;
    transform: rotate(45deg);
    animation: float-shape 12s ease-in-out infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float-shape {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 0 40px;
    position: relative;
    z-index: 3;
}

.hero-text {
    max-width: 900px;
    margin-bottom: 30px;
}

/* Lower clamp bound (2.2rem) replaces the old fixed mobile overrides */
.hero-text h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.hero-text p {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: min(90%, 700px);
    margin-left: auto;
    margin-right: auto;
}

.hero-text .punchline {
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    letter-spacing: 1.2px;
    line-height: 1.2;
}

.hero-buttons {
    display: flex;
    gap: clamp(15px, 2vw, 20px);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BENEFITS SECTION ===== */
.benefits {
    background: var(--light);
    position: relative;
}

.benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, var(--dark), transparent);
    z-index: 1;
    pointer-events: none;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: clamp(20px, 3vw, 40px);
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.benefit-card {
    border-radius: 20px;
    padding: 50px 35px;
    transition-duration: 0.4s;
    transition-timing-function: var(--ease-bounce);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.benefit-card::before,
.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-15px) scale(1.03);
}

.benefit-card:hover::before,
.case-study-card:hover::before {
    transform: scaleX(1);
}

.benefit-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
}

.benefit-icon i {
    font-size: 2.2rem;
    color: white;
}

.benefit-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* ===== RESULTS SECTION ===== */
.results {
    background: linear-gradient(135deg, var(--light) 0%, var(--primary-tint) 100%);
    position: relative;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin: 40px 0;
}

.result-card {
    text-align: center;
    padding: 50px 30px;
    border-radius: 20px;
    border-color: transparent;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.result-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== PRODUCT DEMO SECTION ===== */
.product-demo {
    background: #f8fafc;
    position: relative;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 50px;
    display: flex;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.video-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.video-thumb {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.video-container:hover .video-thumb {
    transform: scale(1.02);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 10px 20px;
    pointer-events: none;
}

.demo-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(20px, 3vw, 30px);
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.demo-feature {
    text-align: center;
    padding: 40px 30px;
    border-radius: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    background: var(--light);
    border: 1px solid var(--border);
}

.demo-feature:hover {
    background: var(--darker);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.demo-feature i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.demo-feature:hover i {
    transform: scale(1.2);
}

.demo-feature h3,
.demo-container .demo-feature h3 { 
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.demo-feature p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    background-color: var(--dark);
    position: relative;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin-top: 40px;
}

.testimonial-card {
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition-duration: 0.4s;
    transition-timing-function: var(--ease-bounce);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 12px;
    right: 30px;
    font-size: 6rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-15px) scale(1.02);
}

.testimonial-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
    font-style: italic;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

/* Used by testimonials and blog posts (merged from two definitions) */
.author-avatar {
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.author-avatar img {
    display: block;
}

.author-info {
    flex: 1;
}

.author-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--text-primary);
}

.author-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    background: linear-gradient(135deg, var(--light) 0%, var(--dark) 100%);
    position: relative;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    background: var(--light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.faq-question {
    padding: 30px;
    background: var(--light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    color: var(--text-primary);
}

.faq-question:hover {
    background: var(--darker);
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--light);
    line-height: 1.7;
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    padding: 0 30px 30px;
    max-height: 500px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* ===== FEATURE NAVIGATION ===== */
.feature-nav {
    position: sticky;
    top: 80px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.feature-nav-container {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    flex-wrap: wrap;
}

.feature-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: nowrap;
}

.feature-nav-item:hover,
.feature-nav-item.active {
    color: var(--text-primary);
}

.feature-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.feature-nav-item.active::after,
.feature-nav-item:hover::after {
    width: 100%;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    background-color: var(--dark);
    position: relative;
    padding: 100px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: clamp(30px, 4vw, 60px);
    align-items: start;
}

.content-block {
    border-radius: 20px;
    padding: clamp(30px, 4vw, 50px);
    height: fit-content;
}

.content-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.content-visual {
    text-align: center;
    margin-bottom: 30px;
}

.content-visual img {
    width: 100%;
    height:auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.content-text h3,
.content-text .content-heading,
.demo-container h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Privacy and terms section headings (h2 styled like the h3 above) */
.content-heading {
      text-align: inherit;
      margin-top: 0;
}

.content-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
}

/* ===== DEMO CONTAINER ===== */
.demo-container {
    background: var(--light);
    border-radius: 20px;
    padding: clamp(30px, 4vw, 50px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    margin: 40px 0;
    width: 100%;
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.demo-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--text-primary);
}

.demo-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 10px 20px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

.demo-content {
    min-height: 300px;
    background: var(--darker);
    border-radius: 15px;
    border: 1px solid var(--border);
    padding: 30px;
}

/* ===== INTEGRATIONS GRID ===== */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(25px, 3vw, 40px);
    margin-top: 40px;
}

.integration-card {
    border-radius: 20px;
    padding: clamp(30px, 4vw, 50px) clamp(25px, 3vw, 35px);
    transition-duration: 0.4s;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.integration-card:hover {
    transform: translateY(-10px);
}

.integration-icon {
    width: clamp(70px, 10vw, 90px);
    height: clamp(70px, 10vw, 90px);
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    transition: transform 0.3s ease;
}

.integration-card:hover .integration-icon {
    transform: scale(1.1) rotate(5deg);
}

.integration-icon i {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: white;
}

.integration-card h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.integration-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    margin-bottom: 25px;
    flex-grow: 1;
}

pre {
    background: var(--darker);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

code {
    font-family: monospace;
    color: var(--text-primary);
}

/* ===== COMPARISON TABLE ===== */
.comparison-section {
    background: linear-gradient(135deg, var(--light) 0%, var(--dark) 100%);
}

.comparison-table {
    background: var(--light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    background: var(--light);
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
}

.table-header-cell {
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.table-header-cell:first-child {
    text-align: left;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.category-header {
    background: var(--primary);
    font-weight: 700;
    color: var(--light);
    font-size: 1.1rem;
}

.table-cell {
    text-align: center;
    color: var(--text-secondary);
}

.table-cell:first-child {
    text-align: left;
}

.feature-check {
    color: var(--secondary);
    font-size: 1.2rem;
}

.feature-unavailable {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .benefits-grid,
    .demo-features,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr 1fr;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .table-header-cell:first-child,
    .table-cell:first-child {
        text-align: center;
        font-weight: 700;
        color: var(--text-primary);
    }

    .table-row.category-header {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== LAYOUT MODIFIERS ===== */
.benefits-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.comparison-table-3col .table-header,
.comparison-table-3col .table-row {
    grid-template-columns: 1fr 1.5fr 1.5fr;
}
