/* 
  Yuridia A. Guerrero Law Firm 
  UC Berkeley Color Palette:
  Berkeley Blue: #003262
  California Gold: #FDB515
*/

:root {
  /* Light Theme Variables */
  --berkeley-blue: #003262;
  --california-gold: #FDB515;
  --founders-rock: #3B7EA1;
  --web-gray: #888888;

  --bg-color: #ffffff;
  --bg-alt: #f7f9fa;
  --text-color: #333333;
  --text-muted: #666666;
  --heading-color: var(--berkeley-blue);
  --primary-color: var(--berkeley-blue);
  --secondary-color: var(--california-gold);
  --card-bg: #ffffff;
  --border-color: #e0e0e0;

  --header-bg: var(--berkeley-blue);
  --header-text: #ffffff;
  --header-hover: var(--california-gold);

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-color: #0d1620;
  /* Very dark blue */
  --bg-alt: #142232;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --heading-color: #ffffff;
  --primary-color: #3B7EA1;
  /* Lighter blue for better contrast */
  --secondary-color: var(--california-gold);
  --card-bg: #1c2e42;
  --border-color: #2c425e;

  --header-bg: #0a111a;
  --header-text: #ffffff;
  --header-hover: var(--california-gold);

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(28, 46, 66, 0.7);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cinzel', serif;
  color: var(--heading-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

/* Typography Classes */
.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.eyebrow {
  color: var(--secondary-color);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

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

.section {
  padding: 80px 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

/* Header & Nav */
header {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--header-text);
}

.logo-img {
  width: 40px;
  height: 40px;
}

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

.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links a:hover {
  color: var(--header-hover);
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--header-text);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.lang-text {
  font-weight: 700;
  font-size: 0.9rem;
}

[data-theme="light"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--header-text);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: url('../img/hero.jpg') center 20%/cover no-repeat fixed;
  color: #ffffff;
  text-align: left;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 50, 98, 0.7) 0%, rgba(0, 50, 98, 0.3) 40%, rgba(0, 50, 98, 0) 100%);
}

.hero .container {
  max-width: 1350px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0.6;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: #000;
}

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

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

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--berkeley-blue);
  transform: translateY(-2px);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

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

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

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .card {
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

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

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: rgba(0, 50, 98, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .service-icon {
  background: rgba(255, 255, 255, 0.05);
}

.service-card:hover .service-icon {
  transform: rotate(10deg) scale(1.1);
  background: var(--secondary-color);
  color: #000;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.more-card {
  background: linear-gradient(135deg, var(--berkeley-blue) 0%, #004c94 100%);
  border: none;
  justify-content: center;
}

[data-theme="dark"] .more-card {
  background: linear-gradient(135deg, #1c2e42 0%, #003262 100%);
}

.more-card h3,
.more-card p {
  color: #ffffff;
}

.more-card .service-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.more-card:hover .service-icon {
  background: var(--secondary-color);
  color: #000;
}

.more-card:hover {
  background: linear-gradient(135deg, #003e7a 0%, #0056a8 100%);
}

/* CTA Band */
.cta-band {
  background-color: var(--berkeley-blue);
  color: #ffffff;
}

.cta-band h2 {
  color: #ffffff;
}

.cta-band p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.info-item {
  margin-top: 1.5rem;
}

.info-item p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.business-card-container {
  margin: 2rem 0;
  perspective: 1000px;
}

.business-card-img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-color);
}

.business-card-img:hover {
  transform: rotateY(5deg) rotateX(5deg) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-alt);
  color: var(--text-color);
  border-radius: 4px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(253, 181, 21, 0.2);
}

.w-100 {
  width: 100%;
}

/* Footer */
footer {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

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

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

/* Responsive */
@media (max-width: 900px) {

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--header-bg);
    padding-top: 80px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  nav.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .controls {
    margin-right: 1rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Subpage Header (Shared) */
.page-header {
  padding: 30px 0;
  text-align: center;
  background-color: var(--header-bg);
  color: white;
}

.page-header h1 {
  color: white;
}

.page-header .eyebrow {
  color: var(--secondary-color);
}

/* Booking Page Specific Styles */
.booking-section {
  padding: 40px 0 80px 0;
  background-color: var(--bg-alt);
}

.booking-container {
  max-width: 1100px;
  margin: 0 auto;
}

.iframe-wrapper {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 750px;
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .iframe-wrapper {
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .booking-section {
    padding: 20px 0 40px 0;
  }
  .iframe-wrapper {
    height: 600px;
    border-radius: 8px;
  }
}