/* 
 * DR. REDDYS LABORATORIES LTD. (Rd Support) - Main Stylesheet
 * Mobile-first, responsive design
 */

/* === Base Styles === */
:root {
  --primary: #1a5f7a;
  --primary-dark: #124559;
  --secondary: #ff6b35;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --white: #ffffff;
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 4px;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary);
}

.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-secondary {
  color: var(--white);
  background-color: var(--secondary);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background-color: #e85a2a;
  border-color: #e85a2a;
  color: var(--white);
}

.btn-outline {
  color: var(--primary);
  background-color: transparent;
  border-color: var(--primary);
}

.btn-outline:hover {
  color: var(--white);
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* === Header & Navigation === */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 40px;
  margin-right: 0.5rem;
}

.navbar-brand h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
  color: var(--primary);
}

.navbar-brand span {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
}

.navbar-toggler {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

.navbar-nav {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: var(--shadow);
  height: 0;
  overflow: hidden;
  transition: var(--transition);
  list-style: none;
  padding: 0;
}

.navbar-nav.show {
  height: auto;
  padding: 1rem 0;
}

.nav-item {
  text-align: center;
  padding: 0.5rem 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.nav-link.active {
  color: var(--secondary);
}

/* === Hero Section === */
.hero {
  background-color: var(--light);
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--gray);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* === Features Section === */
.features {
  background-color: var(--white);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  background-color: var(--light);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* === About Section === */
.about {
  background-color: var(--light);
}

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

.about-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* === Services Section === */
.services {
  background-color: var(--white);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background-color: var(--light);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* === Testimonials Section === */
.testimonials {
  background-color: var(--light);
}

.testimonial-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.testimonial-content {
  position: relative;
  padding-left: 2rem;
}

.testimonial-content:before {
  content: '"';
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.3;
}

.testimonial-author {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

.testimonial-author-info h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.testimonial-author-info p {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--gray);
}

/* === Partners Section === */
.partners {
  background-color: var(--white);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.partner-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.partner-logo:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* === Contact Section === */
.contact {
  background-color: var(--light);
}

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

.contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 1rem;
}

.contact-details h4 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.contact-details p {
  margin-bottom: 0;
}

.contact-form {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dark);
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(26, 95, 122, 0.25);
}

.form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.form-check-input {
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.form-check-label {
  font-size: 0.875rem;
}

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:invalid + .invalid-feedback {
  display: block;
}

/* === Map Section === */
.map {
  height: 400px;
  margin-top: 2rem;
}

/* === Footer === */
.footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer-brand h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* === Legal Pages === */
.legal-page {
  padding: 7rem 0 3rem;
}

.legal-content {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content p, .legal-content ul, .legal-content ol {
  margin-bottom: 1rem;
}

.legal-content ul, .legal-content ol {
  padding-left: 1.5rem;
}

/* === Media Queries === */
@media (min-width: 576px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
  
  .partner-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
  
  .section-title h2 {
    font-size: 2.5rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .feature-grid, .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-content {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  
  .contact-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .partner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .navbar-toggler {
    display: none;
  }
  
  .navbar-nav {
    position: static;
    height: auto;
    display: flex;
    box-shadow: none;
    overflow: visible;
  }
  
  .nav-item {
    padding: 0;
  }
  
  .feature-grid, .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .partner-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 2rem;
  }
}
