/* ============================================================
   Mittal Silk Mills - Main Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --primary:     #106eea;
  --primary-dark:#0a54b5;
  --dark:        #1a1a2e;
  --text:        #444;
  --light-bg:    #f1f6fc;
  --gray-bg:     #f4f6fa;
  --white:       #ffffff;
  --border:      #e0e8f5;
  --footer-bg:   #1a1a2e;
  --footer-text: #b0bec5;
  --font-head:   'Playfair Display', serif;
  --font-body:   'DM Sans', sans-serif;
  --radius:      8px;
  --shadow:      0 4px 24px rgba(16,110,234,.10);
  --transition:  0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* --- Container --- */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* --- Section spacing --- */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

/* --- Section Title --- */
.sec-title { text-align: center; margin-bottom: 50px; }
.sec-title .sub { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.sec-title h2 { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--dark); line-height: 1.25; }
.sec-title p { margin-top: 14px; color: #666; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ============================================================
   TOOLBAR (top bar)
   ============================================================ */
.toolbar {
  background: var(--dark);
  color: #aaa;
  font-size: 13px;
  padding: 8px 0;
}
.toolbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 20px; }
.toolbar a { color: #ccc; }
.toolbar a:hover { color: var(--white); }
.toolbar i { margin-right: 6px; color: var(--primary); }
.toolbar .hours { color: #aaa; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo img { height: 82px; }

/* Nav */
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu li { position: relative; }
.nav-menu > li > a {
  display: block;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a { background: var(--light-bg); color: var(--primary); }

/* Dropdown */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 240px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border-top: 3px solid var(--primary);
  z-index: 200;
  padding: 8px 0;
}
.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--dark);
  transition: background var(--transition), color var(--transition);
}
.nav-menu .sub-menu li a:hover { background: var(--light-bg); color: var(--primary); padding-left: 26px; }
.nav-menu li:hover > .sub-menu { display: block; animation: fadeDown .2s ease; }

@keyframes fadeDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider { position: relative; overflow: hidden; background: var(--dark); min-height: 520px; }
.hero-slide {
  display: none;
  position: relative;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  align-items: center;
}
.hero-slide.active { display: flex; animation: heroFade .8s ease; }
@keyframes heroFade { from { opacity:0; } to { opacity:1; } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(10,20,50,.72) 40%, rgba(10,20,50,.30)); }
.hero-content { position: relative; z-index: 2; padding: 80px 0; max-width: 640px; }
.hero-content h1 { font-family: var(--font-head); font-size: clamp(2rem, 4.5vw, 3.4rem); color: var(--white); line-height: 1.2; margin-bottom: 24px; }
.hero-content p { color: rgba(255,255,255,.8); font-size: 17px; margin-bottom: 32px; }
.btn { display: inline-block; padding: 13px 32px; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all var(--transition); border: 2px solid transparent; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,110,234,.4); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* Slider controls */
.slider-prev, .slider-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,.3); color: var(--white);
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px;
  cursor: pointer; transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.slider-prev { left: 20px; }
.slider-next { right: 20px; }
.slider-prev:hover, .slider-next:hover { background: var(--primary); border-color: var(--primary); }
.slider-dots { position: absolute; bottom: 18px; width: 100%; text-align: center; z-index: 10; }
.slider-dots span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); margin: 0 4px; cursor: pointer; transition: background var(--transition); }
.slider-dots span.active { background: var(--white); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.about-text .sub { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.about-text h2 { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--dark); margin-bottom: 16px; }
.about-text p { color: #555; margin-bottom: 28px; }
.about-feature { display: flex; gap: 18px; margin-bottom: 22px; }
.about-feature .icon { flex-shrink: 0; width: 48px; height: 48px; background: var(--light-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.about-feature .icon img { width: 26px; }
.about-feature h4 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.about-feature p { font-size: 14px; color: #666; margin: 0; }

/* ============================================================
   PRODUCTS / SPECIALITIES
   ============================================================ */
.products-section { background: var(--gray-bg); }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card .thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3; background: var(--gray-bg);
}
.product-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease; display: block;
}
.product-card:hover .thumb img { transform: scale(1.07); }
.product-card .thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,30,70,.55) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.product-card:hover .thumb-overlay { opacity: 1; }
.product-card .card-body { padding: 16px 16px 20px; }
.product-card h5 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 6px; line-height: 1.4; }
.product-card h5 a { color: var(--dark); }
.product-card h5 a:hover { color: var(--primary); }
.product-card p { font-size: 12.5px; color: #777; line-height: 1.5; }

/* ============================================================
   GALLERY / PORTFOLIO STRIP
   ============================================================ */
.gallery-section { background: var(--white); padding: 60px 0; overflow: hidden; }
.gallery-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 10px; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 260px; border-radius: var(--radius); overflow: hidden; position: relative; scroll-snap-align: start; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { padding: 12px 16px; background: var(--dark); color: var(--white); font-size: 14px; font-weight: 500; }
.gallery-caption a { color: var(--white); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section { background: var(--white); }
.testi-slider-wrap { position: relative; max-width: 760px; margin: 0 auto; }
.testi-slide { display: none; }
.testi-slide.active { display: block; animation: heroFade .5s ease; }
.testi-card { background: var(--gray-bg); border-radius: 14px; padding: 40px; box-shadow: var(--shadow); text-align: center; }
.testi-card .quote-icon { font-size: 40px; color: var(--primary); line-height: 1; margin-bottom: 20px; opacity: .3; }
.testi-card blockquote { font-size: 16px; color: #444; line-height: 1.8; margin-bottom: 28px; }
.testi-card .avatar img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 3px solid var(--primary); }
.testi-card .name { font-weight: 700; font-size: 16px; color: var(--dark); }
.testi-card .designation { font-size: 13px; color: var(--primary); }
.testi-nav { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.testi-nav span { width: 10px; height: 10px; border-radius: 50%; background: #ccc; cursor: pointer; transition: background var(--transition); }
.testi-nav span.active { background: var(--primary); }

/* ============================================================
   PARTNERS
   ============================================================ */
.partners-section { background: var(--white); padding: 60px 0; }
.partners-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; }
.partner-logo img { height: 52px; object-fit: contain; filter: grayscale(100%); opacity: .55; transition: filter var(--transition), opacity var(--transition); }
.partner-logo img:hover { filter: grayscale(0%); opacity: 1; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { background: var(--gray-bg); }
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.contact-form-wrap { padding: 48px 40px; }
.contact-info-wrap { background: var(--primary); padding: 48px 32px; color: var(--white); }
.contact-info-wrap h3 { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 30px; }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-item .ci-icon { width: 38px; height: 38px; background: rgba(255,255,255,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.contact-info-item h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; opacity: .7; margin-bottom: 4px; }
.contact-info-item p, .contact-info-item a { font-size: 14px; color: var(--white); margin: 0; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 15px;
  color: var(--dark); background: var(--white); transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,110,234,.10); }
.form-group textarea { min-height: 130px; resize: vertical; }
#form-messages { padding: 12px; border-radius: var(--radius); margin-bottom: 16px; display: none; font-size: 14px; }
#form-messages.success { background: #e6f9f0; color: #1a7a4a; display: block; }
#form-messages.error { background: #fdecea; color: #c0392b; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.footer-top { padding: 70px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 50px; }
.footer-col h4 { font-family: var(--font-head); font-size: 1.1rem; color: var(--white); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); display: inline-block; }
.footer-logo img { height: 76px; margin-bottom: 18px; }
.footer-col p { font-size: 14px; line-height: 1.8; color: var(--footer-text); margin-bottom: 20px; }
.footer-links li { margin-bottom: 9px; }
.footer-links li a { font-size: 14px; color: var(--footer-text); transition: color var(--transition), padding-left var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-links li a:before { content: '›'; color: var(--primary); font-size: 18px; }
.footer-links li a:hover { color: var(--white); padding-left: 4px; }
.footer-address li { display: flex; gap: 14px; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.footer-address li i { color: var(--primary); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.footer-address a { color: var(--footer-text); }
.footer-address a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #888; }
.footer-bottom a { color: #aaa; }
.footer-bottom a:hover { color: var(--white); }

/* Back to top */
#back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px; background: var(--primary); color: var(--white);
  border: none; border-radius: 50%; font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,110,234,.4);
  display: none; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
#back-to-top:hover { transform: translateY(-4px); }

/* ============================================================
   PAGE BANNER (inner pages)
   ============================================================ */
.page-banner {
  background: linear-gradient(120deg, var(--dark) 60%, var(--primary) 100%);
  color: var(--white); padding: 70px 0; text-align: center;
}
.page-banner h1 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 10px; }
.page-banner .breadcrumb { font-size: 14px; color: rgba(255,255,255,.7); }
.page-banner .breadcrumb a { color: rgba(255,255,255,.85); }
.page-banner .breadcrumb a:hover { color: var(--white); }
.page-banner .breadcrumb span { margin: 0 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 36px; }
}
@media (max-width: 768px) {
  .toolbar { display: none; }
  .hamburger { display: flex; }
  .nav-menu { 
    display: none; flex-direction: column; gap: 0; 
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 12px 0;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { border-radius: 0; padding: 13px 24px; border-bottom: 1px solid var(--border); }
  .nav-menu .sub-menu { position: static; border-top: none; box-shadow: none; background: var(--light-bg); display: none; }
  .nav-menu li.open > .sub-menu { display: block; }
  .nav-menu .sub-menu li a { padding: 10px 24px 10px 40px; }
  .site-header { position: sticky; top: 0; }
  .header-inner { position: relative; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { order: -1; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info-wrap { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { text-align: center; justify-content: center; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 1.7rem; }
  .section { padding: 56px 0; }
}
