/**
 * Trafsol Group Landing Page Styles
 * Professional styling with responsive design
 */

/* ========================================
   Base Styles & Reset
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--card);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
}

.logo-dot.red {
    background-color: #ef4444;
}

.logo-dot.green {
    background-color: #22c55e;
}

.logo-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-left: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--foreground);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    min-height: 100vh;
    padding: 80px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.shape {
    position: absolute;
    opacity: 0.12;
}

.shape.circle {
    border-radius: 50%;
}

.shape.circle.red {
    width: 150px;
    height: 150px;
    background-color: #ef4444;
    top: 10%;
    left: 5%;
}

.shape.circle.green {
    width: 100px;
    height: 100px;
    background-color: #22c55e;
    bottom: 15%;
    right: 10%;
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid var(--foreground);
    opacity: 0.12;
    top: 20%;
    right: 15%;
}

/* Hero Carousel */
.hero-carousel {
    max-width: 1400px;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.slide-content {
    display: grid;
    grid-template-columns: 45fr 55fr;
    gap: 4rem;
    align-items: center;
    min-height: 600px;
}

.slide-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.slide-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--foreground);
    color: var(--background);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 50px;
    width: fit-content;
    text-transform: uppercase;
}

.slide-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--foreground);
    margin: 0;
}

.slide-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--foreground);
    opacity: 0.9;
    max-width: 550px;
}

.slide-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.slide-button.primary {
    background-color: var(--foreground);
    color: var(--background);
    box-shadow: var(--shadow-lg);
}

.slide-button.primary:hover,
.slide-button.primary:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.slide-button.secondary {
    background-color: transparent;
    color: var(--foreground);
    border-color: var(--foreground);
}

.slide-button.secondary:hover,
.slide-button.secondary:focus {
    background-color: var(--foreground);
    color: var(--background);
    transform: translateY(-3px);
}

.slide-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    /* box-shadow: var(--shadow-2xl); */
    /* background-color: var(--card); */
    margin-top: 50px;
}

.image-frame svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.carousel-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: var(--shadow-md);
}

.carousel-button:hover,
.carousel-button:focus {
    background-color: var(--foreground);
    border-color: var(--foreground);
    transform: scale(1.1);
}

.carousel-button:hover svg,
.carousel-button:focus svg {
    stroke: var(--background);
}

.carousel-button svg {
    stroke: var(--foreground);
    transition: stroke 0.3s ease;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active {
    background-color: var(--foreground);
    width: 40px;
    border-radius: 6px;
}

.indicator:hover {
    background-color: var(--foreground);
    transform: scale(1.2);
}

/* ========================================
   Section Containers
   ======================================== */

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-title-center {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.decorative-line {
    width: 100px;
    height: 4px;
    background-color: var(--primary);
    margin-bottom: 2rem;
}

.decorative-line-center {
    width: 150px;
    height: 4px;
    background-color: var(--primary);
    margin: 0 auto 2rem;
}

.section-text {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ========================================
   About Section
   ======================================== */

.about-section {
    background-color: var(--card);
}

.about-image .image-card {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-image svg {
    width: 100%;
    height: auto;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--muted-foreground);
}

/* ========================================
   Services Section
   ======================================== */

.services-section {
    background-color: var(--background);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover,
.service-card:focus-within {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.service-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section {
    background-color: var(--card);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.contact-link {
    font-size: 1rem;
    color: var(--muted-foreground);
    transition: color 0.3s ease;
}

.contact-link:hover,
.contact-link:focus {
    color: var(--foreground);
    text-decoration: underline;
}

.tagline-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

/* Contact Form */

.contact-form-wrapper {
    background-color: var(--background);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--foreground);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--card);
    color: var(--foreground);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(242, 203, 4, 0.1);
}

.submit-button {
    padding: 1rem 2rem;
    background-color: var(--foreground);
    color: var(--background);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.submit-button:hover,
.submit-button:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--foreground);
    color: var(--background);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo .logo-text {
    color: var(--background);
}

.footer-logo .logo-dot.yellow {
    background-color: var(--primary);
}

.footer-tagline {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1rem;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--background);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary);
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(242, 203, 4, 0.3);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 100px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--card);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .slide-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .slide-badge {
        margin: 0 auto;
    }

    .slide-description {
        margin: 0 auto;
    }

    .slide-actions {
        justify-content: center;
    }

    .carousel-controls {
        padding: 0 0.5rem;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
    }

    .section-container {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .hero-section {
        padding: 80px 0 0;
    }

    .hero-carousel {
        padding: 1rem;
    }

    .carousel-wrapper {
        min-height: 500px;
    }

    .slide-content {
        min-height: 500px;
        gap: 2rem;
    }

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

    .slide-description {
        font-size: 1rem;
    }

    .slide-actions {
        flex-direction: column;
        width: 100%;
    }

    .slide-button {
        width: 100%;
    }

    .slide-image {
        display: none;
    }

    .carousel-button {
        width: 36px;
        height: 36px;
    }

    .carousel-button svg {
        width: 18px;
        height: 18px;
    }

    .section-container,
    .section-container-full {
        padding: 4rem 1rem;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .footer {
        padding: 3rem 1rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {

    .header,
    .mobile-menu-toggle,
    .cta-button,
    .submit-button {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}