/**
 * V2 Layout Variations
 * Diverse section layouts for visual dynamism
 */

/* ===========================================
   ALTERNATING SECTION BACKGROUNDS
   =========================================== */
.bg-section-white {
    background-color: #ffffff;
}

.bg-section-light {
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.bg-section-gradient {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);
    border-top: 2px solid #e7e7e7;
    border-bottom: 2px solid #e7e7e7;
}

.bg-section-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
}

.bg-section-dark h2,
.bg-section-dark h3 {
    color: #ffffff;
}

.bg-section-dark p {
    color: #94a3b8;
}

/* ===========================================
   BENTO GRID - Section "Serve"
   =========================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.5rem;
}

.bento-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.2);
}

.bento-card.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-card.bento-large h3,
.bento-card.bento-large p {
    color: #ffffff;
}

.bento-card.bento-large p {
    opacity: 0.9;
}

.bento-card.bento-large i {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.bento-card.bento-large::before {
    display: none;
}

.bento-card i {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.bento-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bento-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 991px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card.bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-card.bento-large {
        grid-column: span 1;
    }
}

/* Bento Grid with 5 cards */
.bento-grid.bento-5 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
}

.bento-grid.bento-5 .bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-grid.bento-5 .bento-card:nth-child(2) {
    grid-column: span 1;
}

.bento-grid.bento-5 .bento-card:nth-child(3) {
    grid-column: span 1;
}

.bento-grid.bento-5 .bento-card:nth-child(4) {
    grid-column: span 1;
}

.bento-grid.bento-5 .bento-card:nth-child(5) {
    grid-column: span 1;
}

@media (max-width: 991px) {
    .bento-grid.bento-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-grid.bento-5 .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }
    .bento-grid.bento-5 .bento-card:nth-child(n) {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    .bento-grid.bento-5 {
        grid-template-columns: 1fr;
    }
    .bento-grid.bento-5 .bento-large,
    .bento-grid.bento-5 .bento-card:nth-child(n) {
        grid-column: span 1;
    }
}

/* ===========================================
   IMAGE + ACCORDION - Section "Why"
   =========================================== */
.why-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-illustration {
    position: relative;
}

.why-illustration-inner {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border-radius: 32px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.why-illustration-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.why-illustration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.why-illustration-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.why-illustration-item:hover {
    transform: translateY(-5px);
}

.why-illustration-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.why-illustration-item span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.why-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.why-accordion-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.why-accordion-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.why-accordion-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
}

.why-accordion-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s ease;
}

.why-accordion-header:hover {
    background: #f8fafc;
}

.why-accordion-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.why-accordion-item.active .why-accordion-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
}

.why-accordion-title {
    flex: 1;
}

.why-accordion-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.why-accordion-arrow {
    font-size: 1.25rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.why-accordion-item.active .why-accordion-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.why-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.why-accordion-item.active .why-accordion-content {
    max-height: 200px;
}

.why-accordion-content p {
    padding: 0 1.5rem 1.5rem 5rem;
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

@media (max-width: 991px) {
    .why-split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .why-illustration {
        order: -1;
    }
}

/* ===========================================
   ZIGZAG LAYOUT - Section "Use Cases"
   =========================================== */
.zigzag-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.zigzag-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.zigzag-item:nth-child(even) {
    direction: rtl;
}

.zigzag-item:nth-child(even) > * {
    direction: ltr;
}

.zigzag-image {
    position: relative;
}

.zigzag-image-inner {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.zigzag-image-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zigzag-item:hover .zigzag-image-inner::before {
    opacity: 1;
}

.zigzag-image-inner i {
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.8;
    transition: all 0.4s ease;
}

.zigzag-item:hover .zigzag-image-inner i {
    transform: scale(1.1);
    opacity: 1;
}

.zigzag-content {
    padding: 1rem 0;
}

.zigzag-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.zigzag-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

.zigzag-content p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 991px) {
    .zigzag-item,
    .zigzag-item:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }
    .zigzag-image {
        order: -1;
    }
}

/* ===========================================
   HORIZONTAL FEATURE CARDS
   =========================================== */
.horizontal-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.horizontal-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.horizontal-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.2);
    transform: translateX(10px);
}

.horizontal-card-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.horizontal-card:hover .horizontal-card-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    transform: rotate(5deg) scale(1.05);
}

.horizontal-card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.horizontal-card-content p {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 576px) {
    .horizontal-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================================
   FLOATING ELEMENTS & DECORATIONS
   =========================================== */
.section-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.decoration-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    filter: blur(40px);
}

.decoration-dots {
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(37, 99, 235, 0.2) 2px, transparent 2px);
    background-size: 15px 15px;
}

/* ===========================================
   ANIMATED COUNTERS / STATS
   =========================================== */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 2rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===========================================
   SMOOTH SECTION TRANSITIONS
   =========================================== */
section {
    position: relative;
}

.section-wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.section-wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.section-wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.section-wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

/* ===========================================
   FOOTER LEGAL LINKS
   =========================================== */
.footer-legal-links {
    display: block;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .footer-legal-links {
        justify-content: center;
    }
}

.footer-legal-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-legal-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-legal-separator {
    color: #cbd5e1;
    font-size: 0.8rem;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: #fff;
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

.footer-social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
    color: #fff;
}

.footer-social-link i {
    line-height: 1;
}

@media (max-width: 768px) {
    .footer-social {
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }

    .footer-legal-links {
        justify-content: center;
    }
}

/* Founder LinkedIn Icons */
.founder-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.founder-linkedin:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
    color: #fff;
}

.founder-linkedin i {
    line-height: 1;
}

/* ===========================================
   5 KEY POINTS SECTION
   =========================================== */
.keypoints-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.keypoints-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.keypoints-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.keypoints-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.keypoint-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.keypoint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.keypoint-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.1);
}

.keypoint-card:hover::before {
    transform: scaleX(1);
}

.keypoint-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 800;
    background-clip: padding-box;
    position: relative;
    transition: all 0.4s ease;
}

.keypoint-number span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.keypoint-card:hover .keypoint-number {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: rotate(5deg) scale(1.1);
}

.keypoint-card:hover .keypoint-number span {
    -webkit-text-fill-color: #ffffff;
    background: none;
}

.keypoint-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 1199px) {
    .keypoints-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .keypoint-card:nth-child(4),
    .keypoint-card:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 991px) {
    .keypoints-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .keypoint-card:nth-child(5) {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .keypoints-grid {
        grid-template-columns: 1fr;
    }
    .keypoint-card:nth-child(5) {
        grid-column: span 1;
    }
    .keypoint-card {
        padding: 1.5rem;
    }
}

/* ===========================================
   LANGUAGE SELECTOR
   =========================================== */
.lang-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-selector:hover,
.lang-selector:focus {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.lang-selector::after {
    display: none;
}

.lang-selector .lang-flag {
    font-size: 1.4rem;
    line-height: 1;
}

.lang-dropdown {
    min-width: 160px;
    padding: 0.5rem;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-top: 0.5rem;
    animation: langDropdownFade 0.2s ease;
}

@keyframes langDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.lang-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
}

.lang-option.active:hover {
    color: #ffffff;
}

.lang-option .lang-flag {
    font-size: 1.25rem;
    line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .nav-item.dropdown {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e5e7eb;
    }

    .lang-selector {
        width: 100%;
        justify-content: flex-start;
        padding: 0.5rem 1rem;
        border-radius: 8px;
    }

    .lang-selector .lang-flag {
        margin-right: 0.5rem;
    }

    .lang-selector::before {
        content: 'Language';
        font-size: 0.9rem;
        color: #64748b;
        margin-left: 0.5rem;
    }

    .lang-dropdown {
        position: static !important;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        margin-top: 0.5rem;
        transform: none !important;
    }
}

/* ===========================================
   LEGAL MODAL STYLES
   =========================================== */
#legalModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#legalModal .modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

#legalModal .modal-title {
    font-size: 1.5rem;
    color: #0f172a;
}

#legalModal .modal-body {
    padding: 1rem 1.5rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

#legalModal .modal-body h1,
#legalModal .modal-body h2,
#legalModal .modal-body h3,
#legalModal .modal-body h4 {
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#legalModal .modal-body h1:first-child,
#legalModal .modal-body h2:first-child,
#legalModal .modal-body h3:first-child {
    margin-top: 0;
}

#legalModal .modal-body p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}

#legalModal .modal-body ul,
#legalModal .modal-body ol {
    color: #475569;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#legalModal .modal-body li {
    margin-bottom: 0.5rem;
}

#legalModal .modal-body a {
    color: var(--primary-color);
}

#legalModal .modal-footer {
    padding: 0.5rem 1.5rem 1.5rem;
}
