/*
Theme Name: Susways
Author: Susways
Description: Custom theme for Susways.
Version: 1.0
*/

:root {
    --primary-color: #014a24;
    --primary-dark: #003310;
    --primary-light: #026b34;
    --accent-green: #e8f5e9;
    --text-dark: #222222;
    --text-gray: #555555;
    --bg-light: #ffffff;
    --bg-off-white: #f8f9fa;

    --font-en: 'Inter', sans-serif;
    --font-ar: 'Almarai', sans-serif;

    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --card-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-en);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    overflow: hidden;
    /* Main handles scroll */
}

/* Typography */
.arabic-title,
[lang="ar"] {
    font-family: var(--font-ar);
}

h1 {
    font-weight: 700;
    letter-spacing: -1px;
}

h2 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Scroll Snap Container */
.scroll-container {
    height: 100dvh;
    /* Mobile Friendly Fix */
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.section {
    height: 100dvh;
    /* Mobile Friendly Fix */
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    overflow: hidden;
}

.section-content {
    max-width: 600px;
    /* Optimal readability width */
    width: 100%;
    margin: 0 auto;
    z-index: 2;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* 
   -----------------------------------------
   HERO SECTION & LOGO 
   -----------------------------------------
*/
.hero-section {
    background: radial-gradient(circle at center, #fafffc 0%, #edf7f2 100%);
    text-align: center;
}

.logo-container {
    margin: 0 auto 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    width: 350px;
    height: auto;
    display: block;
    /* Optional shadow/filter if the png needs pop */
    /* filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1)); */
}

/* 
   -----------------------------------------
   HERO ANIMATION (Floating Molecules)
   -----------------------------------------
*/
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.molecule {
    position: absolute;
    opacity: 0.1;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
}

/* 1. Hexagon (Benzene Ring style) */
.mol-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    border-radius: 12px;
    /* rounded square/poly */
    transform: rotate(45deg);
    animation: floatRotate 20s infinite linear;
}

.mol-1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* 2. Diatomic Bond (dumbbells) */
.mol-2 {
    width: 80px;
    height: 20px;
    top: 60%;
    right: 15%;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: floatMove 25s infinite ease-in-out alternate;
}

.mol-2::before,
.mol-2::after {
    content: '';
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Line between atoms */
.mol-2 {
    background: linear-gradient(90deg, transparent 8px, var(--primary-color) 8px, var(--primary-color) calc(100% - 8px), transparent calc(100% - 8px));
    background-size: 100% 2px;
    background-repeat: no-repeat;
    background-position: center;
}

/* 3. Triangle/Water molecule shape */
.mol-3 {
    width: 40px;
    height: 40px;
    bottom: 20%;
    left: 20%;
    border: none;
    animation: floatRotate 15s infinite reverse linear;
}

.mol-3::before,
.mol-3::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.mol-3::before {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
}

.mol-3::after {
    bottom: 0;
    left: 0;
    box-shadow: 30px 0 0 var(--primary-color);
    /* third atom */
}

/* 4. Simple Ring */
.mol-4 {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 25%;
    border: 1px dashed var(--primary-light);
    animation: floatPulse 10s infinite ease-in-out;
}

@keyframes floatRotate {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }

    50% {
        transform: rotate(180deg) translate(20px, 20px);
    }

    100% {
        transform: rotate(360deg) translate(0, 0);
    }
}

@keyframes floatMove {
    0% {
        transform: translateY(0) translateX(0);
    }

    100% {
        transform: translateY(-40px) translateX(20px);
    }
}

@keyframes floatPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

.hero-content .hero-logo {
    position: relative;
    z-index: 2;
    /* Ensure content is above bg */
}

.scroll-indicator {
    z-index: 2;
}

/* Typography Hero */
/* .hero-content h1 removed since logo replaces it */

.hero-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 400px;
    margin: 0 auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color);
    font-size: 0.9rem;
    opacity: 0.6;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator .arrow {
    font-size: 1.5rem;
    margin-top: 5px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* 
   -----------------------------------------
   CONTACT SECTION (Modern Cards)
   -----------------------------------------
*/
.contact-section {
    background-color: #fff;
}

.contact-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card-modern {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: var(--card-radius);
    padding: 1.2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Hover effects for desktop */
@media (hover: hover) {
    .contact-card-modern:hover:not(.no-hover) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        border-color: var(--primary-color);
    }
}

.icon-circle {
    width: 50px;
    height: 50px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-info p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* 
   -----------------------------------------
   PRODUCTS SECTION (Clean Showcase)
   -----------------------------------------
*/
.products-section {
    background-color: var(--bg-off-white);
}

.product-showcase {
    width: 100%;
}

.product-highlight {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(1, 74, 36, 0.05);
    display: flex;
    flex-direction: column;
}

.ph-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 2rem;
    color: white;
    position: relative;
}

.ph-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.p-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.ph-body {
    padding: 2rem;
}

.ph-desc {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.specs-grid {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
}

.spec-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.ph-footer {
    padding: 0 2rem 2rem;
}

.btn-modern {
    display: block;
    width: 100%;
    background-color: var(--text-dark);
    /* Black button for contrast */
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-modern:active,
.btn-modern:hover {
    background-color: var(--primary-color);
}

/* Footer modern */
.footer-modern {
    margin-top: 3rem;
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
}


/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 3000;
    transition: transform 0.3s ease-out;
    font-size: 0.9rem;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive Tweaks */
@media (min-width: 768px) {
    .section-content {
        max-width: 800px;
    }

    .contact-grid-modern {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-card-modern {
        width: calc(50% - 0.5rem);
    }
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    html {
        font-size: 14px;
        /* Slightly smaller text */
    }

    .hero-logo {
        width: 280px;
        /* Smaller logo */
    }

    .contact-grid-modern {
        gap: 0.8rem;
    }

    .contact-card-modern {
        padding: 1rem;
    }

    .product-highlight {
        padding: 1.5rem;
    }
}

/* 
   -----------------------------------------
   PRODUCT SIDEBAR NAVIGATION
   -----------------------------------------
*/
.product-nav {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.product-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.product-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Increase gap for better click targets */
    position: relative;
    padding-left: 0;
}

/* Vertical line connecting dots */
.product-nav ul::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 7px;
    /* Center of dot (14px width / 2) */
    width: 2px;
    background-color: rgba(1, 74, 36, 0.2);
    z-index: -1;
}

.product-nav li {
    position: relative;
}

.nav-btn {
    width: 14px;
    height: 14px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    font-size: 0;
    /* Hide text */
    color: transparent;
}

/* The Dot */
.nav-btn::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover::before {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.nav-btn.active::before {
    background-color: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(1, 74, 36, 0.2);
}

/* 
   PRODUCT SECTIONS (Full Page per Product)
   These now behave exactly like the main Hero/Contact sections.
*/
.product-section {
    /* Inherit base properties from .section but ensure specifics */
    height: 100dvh;
    /* Mobile Friendly Fix */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-off-white);
    padding: 0;
}

.product-section .section-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Center the product card on the "page" */
.product-highlight {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    /* Reset margins as the flex parent centers it */
    margin: 0;
}

/* Title handling */
.product-section .section-title {
    margin-bottom: 2rem;
}

/* Cleanup old nested scroll styles */
.products-section {
    display: none;
}

/* 
   MODAL STYLES (Request Details)
*/
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* High z-index to sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    /* 15% from the top and centered */
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.modal-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(1, 74, 36, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}