/* 
===========================================
    Flour Mill - Design System & Styles
    Author: Flour Mill
    Version: 1.0.0
===========================================
*/

/* --- Variables & Theming --- */
:root {
    /* Primary Colors (Warm Golden/Wheat Theme) */
    --primary-color: #E6B325;     /* Golden Amber */
    --primary-light: #FFDC73;    /* Light Wheat */
    --primary-dark: #C6950B;     /* Deep Gold */
    
    /* Secondary Colors (Nature/Organic Theme) */
    --secondary-color: #2D4C3B;   /* Deep Forest Green */
    --secondary-light: #4A7A60;  /* Leaf Green */
    
    /* Neutral & Background Colors */
    --bg-dark: #121212;          /* Very Dark Gray/Black */
    --bg-card: #1E1E1E;          /* Darker Gray for Cards */
    --bg-light: #F9F7F1;         /* Off-white/Cream */
    --text-main: #E0E0E0;        /* Light Gray for default text */
    --text-muted: #A0A0A0;       /* Muted text */
    --white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing & Utilities */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(230, 179, 37, 0.4);
}

/* --- Base Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container & Layout --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 6rem 0;
}

/* --- Utility Classes --- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.w-100 { width: 100%; }

/* Glassmorphism Effect */
.glassmorphism {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(230, 179, 37, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, #FFC133, var(--primary-color));
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(230, 179, 37, 0.1);
    transform: translateY(-3px);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.2rem 0;
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i { color: var(--primary-color); }
.logo span { color: var(--primary-color); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn-primary) {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-normal);
}

.nav-links a:not(.btn-primary):hover { color: var(--white); }
.nav-links a:not(.btn-primary):hover::after { width: 100%; }

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 2rem;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-toggle button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.2rem 0.5rem;
    font-family: var(--font-body);
}

.lang-toggle button.active {
    color: var(--primary-color);
    font-weight: 700;
}

.lang-toggle button:hover:not(.active) {
    color: var(--white);
}

.lang-sep {
    color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 1rem 2rem;
    text-align: center;
    /* Placeholder pattern since no image */
    background: radial-gradient(circle at center, rgba(30,30,30,1) 0%, rgba(18,18,18,1) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230,179,37,0.05) 0%, transparent 60%);
    animation: rotateSlowly 30s linear infinite;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(230, 179, 37, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(230, 179, 37, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.25;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: var(--transition-normal);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition-normal);
    transform-origin: left;
}

.service-card:hover::before { transform: scaleX(1); }
.hover-lift:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(230, 179, 37, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 auto 1.5rem;
    transition: var(--transition-normal);
}

.service-card:hover .card-icon {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.price-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #2A2A2A;
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- Calculators Section --- */
.bg-light {
    background-color: rgba(25, 25, 25, 0.4);
    border-top: 1px solid rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.calculator-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.calculator-card {
    padding: 3rem 2.5rem;
}

.calculator-card h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.calc-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="number"], input[type="text"], input[type="tel"], select {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-normal);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(230, 179, 37, 0.2);
}

.result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(230, 179, 37, 0.05);
    border: 1px dashed var(--primary-color);
    border-radius: var(--radius-sm);
    text-align: center;
}

.result-box h4 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
    font-family: var(--font-heading);
}

/* --- Booking Section --- */
#booking .container.booking-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
}

.booking-content {
    flex: 1;
    min-width: 300px;
}

.booking-content h2 {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.booking-content > p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.delivery-checker {
    padding: 2rem;
    border-radius: var(--radius-md);
}

.delivery-checker h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checker-flex {
    display: flex;
    gap: 1rem;
}

.checker-flex input {
    flex: 1;
}

.pincode-msg {
    margin-top: 1rem;
    font-size: 0.95rem;
    height: 1.5em; /* reserve space */
}

.msg-success { color: #4ade80; }
.msg-error { color: #f87171; }

.booking-form {
    flex: 1;
    min-width: min(100%, 350px);
    width: 100%;
    padding: 3rem;
    box-sizing: border-box;
    overflow: hidden;
}

.booking-form h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select option {
    background-color: var(--bg-card);
    color: var(--white);
}

/* --- Footer --- */
.footer {
    background-color: #0A0A0A;
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

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

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--bg-dark);
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rotateSlowly {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in-up { animation: fadeInUp 1s ease forwards; }
.fade-in-up-delay { animation: fadeInUp 1s ease 0.3s forwards; opacity: 0; }

/* --- RTL / Urdu Styling --- */
html[dir="rtl"] {
    /* Use a nicer font for Urdu if available, otherwise default system fonts that support Arabic/Urdu gracefully */
    --font-heading: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Amiri', Tahoma, sans-serif;
    --font-body: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Amiri', Tahoma, sans-serif;
}

html[dir="rtl"] body {
    font-size: 1.1rem; /* Urdu fonts usually need slightly larger base size to read well */
}

/* Adjustments for icons and layout in RTL */
html[dir="rtl"] .btn-primary i,
html[dir="rtl"] .btn-secondary i {
    transform: scaleX(-1); /* Flip left/right arrows if necessary */
}

html[dir="rtl"] .delivery-checker h3 i {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .calculator-card h3 i {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .footer-contact p i {
    margin-left: 0.8rem;
    margin-right: 0;
}

html[dir="rtl"] select {
    background-position: left 1rem center; /* Move default dropdown arrow to the left */
}

html[dir="rtl"] .lang-toggle {
    margin-left: 2rem;
    margin-right: auto;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 0;
        gap: 1.5rem;
        border-top: 1px solid rgba(255,255,255,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }

    .lang-toggle {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    html[dir="rtl"] .lang-toggle {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .mobile-menu-btn { display: block; }
    
    #booking .container.booking-container { flex-direction: column; }
    .booking-content { text-align: center; }
    .checker-flex { flex-direction: column; }
}

@media (max-width: 600px) {
    .container { width: 95%; padding: 0 0.5rem; }
    .hero p { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 1rem; }
    .hero-buttons a { width: 100%; }
    .section { padding: 3rem 0; }
    .calculator-card { padding: 2rem 1.2rem; }
    .calculator-container { gap: 1.5rem; }
    .booking-form { padding: 1.5rem; }
    .result-value { font-size: 2rem; }
    .input-group label { font-size: 0.9rem; }
}
