/* MMC Group - Mahajan Molasses Company */
/* Global Styles & Variables */

:root {
    --primary: #A16207;         /* Logo Orange/Amber */
    --primary-hover: #92400E;   /* Darker Amber */
    --accent: #F59E0B;          /* Bright Amber */
    --bg-light: #FFFFFF;        /* Pure White */
    --bg-soft: #FDFCE8;         /* Very Light Cream */
    --text-dark: #111827;       /* Dark Grey/Black */
    --text-muted: #4B5563;      /* Muted Grey */
    --border-light: #E5E7EB;    /* Subtle Grey Border */
}

/* Base resets */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

/* Typography */
h1, h2, h3, h4, .font-display {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Custom Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem 0;
}

@media (max-width: 1023px) {
    #navbar {
        padding: 0.5rem 0;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

#navbar.scrolled {
    padding: 0.75rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1023px) {
    #navbar.scrolled {
        padding: 0.4rem 0;
    }
}

.nav-logo-large {
    height: 60px;
    width: auto;
    transition: all 0.4s ease;
}

@media (max-width: 1023px) {
    .nav-logo-large {
        height: 38px;
    }
}

#navbar.scrolled .nav-logo-large {
    height: 50px;
}

@media (max-width: 1023px) {
    #navbar.scrolled .nav-logo-large {
        height: 34px;
    }
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: var(--text-dark);
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Redesigned Contact Button in Navbar */
.nav-contact-wrapper {
    display: flex;
    align-items: center;
    margin-left: 4rem;
}

.nav-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.75rem;
    border: 1.5px solid var(--primary);
    border-radius: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-contact-btn:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(161, 98, 7, 0.3);
    transform: translateY(-1px);
}

.nav-contact-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Mobile Menu Toggle */
#menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    z-index: 1200; /* Ensure it stays above everything */
}

/* Modern Menu Toggle (2-line offset) */
#menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end; /* Align lines to right */
    width: 32px;
    height: 32px;
    gap: 7px;
    cursor: pointer;
    z-index: 1200;
}

#menu-toggle span {
    display: block;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

/* top line - full width */
#menu-toggle span:nth-child(1) {
    width: 100%;
}

/* bottom line - 65% width */
#menu-toggle span:nth-child(2) {
    width: 65%;
}

/* Hover: extend the short line */
#menu-toggle:hover span:nth-child(2) {
    width: 100%;
}

/* Active State (X) */
#menu-toggle.active span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
    width: 100%;
}

#menu-toggle.active span:nth-child(2) {
    transform: translateY(-4.5px) rotate(-45deg);
    width: 100%;
}

@media (min-width: 1024px) {
    #menu-toggle { display: none !important; }
}

/* Sidebar */
#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85%, 400px);
    height: 100vh;
    background: #ffffff;
    z-index: 1100;
    transform: translateX(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.09);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#mobile-menu.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.sidebar-close-btn {
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-close-btn:hover { background: #f3f4f6; color: #111827; }
.sidebar-close-btn svg { width: 1.2rem; height: 1.2rem; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.8rem 1rem;
    border-radius: 0.875rem;
    color: #374151;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sidebar-link:hover {
    background: #fffbeb;
    color: #b45309;
    transform: translateX(4px);
}

.sidebar-link svg {
    width: 1.2rem;
    height: 1.2rem;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.sidebar-link:hover svg { color: #d97706; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}

#menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.15); /* Subtle dim only, no blur */
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.85rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(161, 98, 7, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.85rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--bg-soft);
    transform: translateY(-2px);
}

/* Forms */
.form-input {
    width: 100%;
    background-color: #F9FAFB;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(161, 98, 7, 0.1);
}

/* Footer Colors */
footer {
    background-color: #FAFAF9;
    border-top: 1px solid var(--border-light);
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Carousel */
:root {
    --carousel-item-size: 300px;
    --carousel-gap: 2rem;
}

@media (max-width: 1024px) {
    :root {
        --carousel-item-size: 250px;
        --carousel-gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --carousel-item-size: 180px;
        --carousel-gap: 1rem;
    }
}

.carousel-container {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    animation: scroll 30s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    width: var(--carousel-item-size);
    height: var(--carousel-item-size);
    background-color: #f3f4f6;
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-item:hover {
    transform: scale(1.05);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-1 * (var(--carousel-item-size) + var(--carousel-gap)) * 5)); }
}

/* Nav Arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(161, 98, 7, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.carousel-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev { left: 1rem; }
.carousel-btn-next { right: 1rem; }

/* Global Spacing Utilities (Fallback for non-TW contexts) */
.section-py {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 1024px) {
    .section-py {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* --- Redesigned Hero Slider --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    background-color: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

/* Ken Burns Effect (Slow Zoom) */
.hero-slide .bg-cover {
    transition: transform 10s linear;
    transform: scale(1);
}

.hero-slide.active .bg-cover {
    transform: scale(1.1);
}

/* Content Animations */
.hero-slide .container > div {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.active .container > div {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* Specific Content Transitions */
.hero-slide h1, .hero-slide h2, .hero-slide p, .hero-slide span, .hero-slide div.flex {
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.active h1, .hero-slide.active h2 { transition-delay: 0.5s; }
.hero-slide.active p { transition-delay: 0.7s; }
.hero-slide.active div.flex { transition-delay: 0.8s; }

/* Custom Dots Styling */
.dot {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot.active {
    background: var(--primary);
    border-color: var(--primary);
    width: 32px;
    border-radius: 6px;
}

/* Responsiveness Tweaks */
@media (max-width: 1024px) {
    .hero-slider {
        height: 80vh;
        min-height: 600px;
    }
    
    .hero-slide h1, .hero-slide h2 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 100vh; /* Full height on mobile for impacts */
        min-height: 600px;
    }
    
    .hero-slide h1, .hero-slide h2 {
        font-size: 2.75rem;
    }
    
    .hero-slide p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .hero-slide .container > div {
        text-align: center !important;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-slide .container > div p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .hero-slide h1, .hero-slide h2 {
        font-size: 2.25rem;
    }
    
    .hero-slide .btn-primary, .hero-slide .btn-outline {
        width: 100%;
        text-align: center;
    }
}

/* --- End Hero Redesign --- */

/* --- Our Clients Solar System --- */
.solar-system-container {
    position: relative;
    width: 100%;
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.solar-center {
    position: relative;
    z-index: 20;
    background: white;
    padding: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 15px 35px rgba(161, 98, 7, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
}

.solar-hub-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    border-radius: 50%;
    border: 1px dashed rgba(161, 98, 7, 0.1);
}

.orbit-inner {
    width: 360px;
    height: 360px;
    margin-top: -180px;
    margin-left: -180px;
    animation: orbit-rotate 40s linear infinite;
    z-index: 15;
}

.orbit-outer {
    width: 640px;
    height: 640px;
    margin-top: -320px;
    margin-left: -320px;
    animation: orbit-rotate 60s linear infinite reverse;
    z-index: 10;
}

.orbiting-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-top: -40px;
    margin-left: -40px;
    transform: rotate(var(--rotation)) translateX(var(--orbit-radius)) rotate(calc(-1 * var(--rotation)));
}

.client-logo-wrapper {
    width: 80px;
    height: 80px;
    background: white;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: stay-upright 40s linear infinite;
    transition: transform 0.3s ease;
}

.orbit-outer .client-logo-wrapper {
    animation-duration: 60s;
    animation-direction: reverse;
}

.client-logo-wrapper:hover {
    transform: scale(1.2);
    box-shadow: 0 15px 30px rgba(161, 98, 7, 0.15);
    z-index: 30;
}

.client-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes stay-upright {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Responsive Solar System */
@media (max-width: 1200px) {
    .solar-system-container { height: 700px; transform: scale(0.85); }
}

@media (max-width: 992px) {
    .solar-system-container { height: 600px; transform: scale(0.7); }
}

@media (max-width: 768px) {
    .solar-system-container { height: 500px; transform: scale(0.55); }
    .solar-center img { width: 80px; }
}

@media (max-width: 480px) {
    .solar-system-container { height: 400px; transform: scale(0.45); }
}
