/* ===================================
   MyLegalAdvices - Main Stylesheet
   =================================== */

/* CSS Variables for Theme */
:root {
  --primary-color: #000000;
  --secondary-color: #333333;
  --accent-color: #ffffff;
  --dark-color: #000000;
  --light-color: #ffffff;
  --text-color: #000000;
  --text-light: #555555;
  --border-color: #cccccc;
  --success-color: #000000;
  --error-color: #000000;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

a:hover {
  color: var(--secondary-color);
}

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

/* Header & Navigation */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(51, 51, 51, 0.95)),
              url('../images/hero-bg.jpg') center/cover;
  color: white;
  text-align: center;
  padding: 5rem 2rem;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInDown 1s ease;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--accent-color);
  color: white;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: #c49a2e;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

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

/* Services Section */
.services-section {
  padding: 4rem 2rem;
  background-color: var(--light-color);
}

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

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Service Card */
.service-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-card-image img {
  transform: scale(1.1);
}

.service-card-content {
  padding: 1.5rem;
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-icon {
  font-size: 2rem;
  color: var(--accent-color);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
}

.service-card h3 {
  color: var(--primary-color);
  margin: 0;
  font-size: 1.3rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Loading & Error States */
.loading-message,
.error-message {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
}

.loading-message {
  color: var(--primary-color);
}

.loading-message i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
  animation: spin 1s linear infinite;
}

.error-message {
  color: var(--error-color);
  background-color: #ffe6e6;
  border-radius: 10px;
  margin: 2rem auto;
  max-width: 600px;
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color), #2a2a2a);
  color: white;
  padding: 3rem 2rem 1rem;
}

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

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

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-links {
  list-style: none;
}

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

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

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

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Terms & Privacy Pages */
.content-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content-page h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.content-page h2 {
  color: var(--secondary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-page ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.content-page li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

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

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

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

/* Responsive Design */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--primary-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
    padding: 2rem 0;
    gap: 0;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    width: 100%;
  }

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

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .services-section {
    padding: 2rem 1rem;
  }

  .service-card-content {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  header, footer, .btn {
    display: none;
  }

  .service-card {
    page-break-inside: avoid;
  }
}
