/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;500;600;700&display=swap');

/* ===== VARIABLES & RESET ===== */
:root {
  /* Color System */
  --primary: #219EBC;
  --primary-dark: #2e9ea7;
  --primary-darker: teal;
  --primary-light: rgba(33, 158, 188, 0.1);
  --text-dark: #212529;
  --text-light: #999;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --error: #a94442;
  --error-bg: #fdf7f7;
  
  /* Typography */
  --font-heading: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-accent: 'Inter', sans-serif;
  
  /* Font Weights */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-bolder: 800;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  
  /* Border Radius */
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  
  /* Shadows */
  --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);
  --shadow-special: rgba(33, 158, 188, 0.4) 5px 5px, 
                    rgba(33, 158, 188, 0.3) 10px 10px,
                    rgba(33, 158, 188, 0.2) 15px 15px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body) !important;
  font-weight: var(--weight-normal);
  line-height: 1.6;
  color: var(--text-dark);
}

main > .container {
  padding: 70px 15px 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

p {
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
  line-height: 1.6;
  margin-bottom: 1em;
}

/* ===== COMPONENT STYLES ===== */

/* Navigation */
.nav-dentist {
  background-color: var(--primary) !important;
  transition: all var(--transition-normal);
}

.navbar-brand,
.nav-item > a {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  color: var(--white) !important;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.nav-link {
  position: relative;
}

.nav-link:hover {
  color: var(--white) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--white);
  transition: width var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.button-dentist {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-block;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.button-dentist:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  margin-bottom: 20px;
}

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

.card-img {
  border-radius: 0;
  transition: transform var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-title {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
  line-height: 1.6;
}

/* VGR Cards Layout Improvements */
.vgr-cards .card {
  display: flex;
  flex-flow: row wrap;
  flex: 100%;
  padding: 20px;
  margin-bottom: var(--space-xxl);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.vgr-cards .card:nth-child(even) .card-img-body {
  order: 2;
}

.vgr-cards .card:nth-child(even) .card-body {
  padding-left: 0;
  padding-right: var(--space-lg);
}

@media (max-width: 767px) {
  .vgr-cards .card {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    padding: 0;
  }
  
  .vgr-cards .card-img-body {
    grid-row: 1;
    height: 200px;
    overflow: hidden;
  }
  
  .vgr-cards .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .vgr-cards .card-body {
    grid-row: 2;
    overflow: auto;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px);
    color: white !important;
    padding: 1.5rem !important;
  }
  

  
  .vgr-cards .card-title,
  .vgr-cards .card-text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  }
}

/* Hero & Introduction Sections */
.introduction-section {
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
  padding: var(--space-xxl) 0;
}

h2.introduction {
  font-family: var(--font-heading);
  font-weight: var(--weight-bolder);
  padding-top: 10%;
  padding-bottom: var(--space-xs);
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: left;
  line-height: 1.2;
}

.introduction-second {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--primary-dark);
  margin-top: -0.5rem;
  padding-left: 25%;
}

@media (max-width: 767px) {
  .introduction-second {
    padding-left: 0;
    text-align: center;
    margin-top: var(--space-xs);
  }
  
  h2.introduction {
    text-align: center;
    padding-top: var(--space-xl);
  }
}

/* Info Sections */
.info-feed {
  --border: .3em;
  position: relative;
  padding: var(--space-lg);
  border: solid var(--border) transparent;
  min-width: 100%;
  border-radius: var(--border-radius-lg);
  background: var(--white);
}

.info-feed::before {
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--border));
  border: inherit;
  background: linear-gradient(var(--primary), var(--primary-dark), var(--primary-darker)) border-box;
  -webkit-mask: 
    conic-gradient(from -90deg at 2em 2em, black 25%, #0000 0) 0 0 / calc(100% - 2em) calc(100% - 2em) border-box,
    conic-gradient(black 0 0) padding-box;
  -webkit-mask-composite: source-out;
  mask: 
    conic-gradient(from -90deg at 2em 2em, black 25%, #0000 0) 0 0 / calc(100% - 2em) calc(100% - 2em) border-box subtract,
    conic-gradient(black 0 0) padding-box;
  content: '';
  border-radius: inherit;
}

h3.info-header {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  text-align: left;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
}

.info-text {
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
  line-height: 1.6;
}

/* Contact & Layout */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.contact-card, .map-container {
  flex: 1 1 300px;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: var(--border-radius);
}

/* Divider with Image */
.divider {
  position: relative;
  overflow: hidden;
  margin: var(--space-xl) 0;
}

.divider img {
  width: 100%;
  height: auto;
  object-fit: cover;
  clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 0% 100%);
}

@media (max-width: 767px) {
  .divider {
    box-shadow: var(--shadow-special);
  }
  
  .divider img {
    clip-path: none;
  }
}

/* Tables */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--primary-light) !important;
}

.table-striped tbody tr:hover {
  background-color: rgba(33, 158, 188, 0.2) !important;
  transition: background-color var(--transition-fast);
}

/* Icons & Utilities */
.icon-container {
  float: left;
  border-right: 2px solid var(--primary);
  padding-right: var(--space-sm);
  margin-right: var(--space-sm);
  margin-left: var(--space-xs);
}

.bg-light-contact {
  background-color: var(--primary-light) !important;
}

.brand-image {
  height: 45px;
  transition: transform var(--transition-normal);
}

.brand-image:hover {
  transform: scale(1.05);
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2c3e50;
  color: var(--white);
  padding: var(--space-lg);
  z-index: 9999;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.3);
  display: none;
  animation: slideUp 0.5s ease-out;
  font-family: var(--font-body);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-consent.show {
  display: block;
}

.cookie-consent-text p {
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
}

/* Footer */
.footer {
  background-color: var(--gray-light);
  font-size: 0.9em;
  padding: var(--space-lg) 0;
  margin-top: auto;
  font-family: var(--font-body);
}

.footer > .container {
  padding-right: 15px;
  padding-left: 15px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  main > .container {
    padding: 80px 10px 15px;
  }
  
  .contact-section {
    flex-direction: column;
  }
  
  .contact-card, .map-container {
    flex: 1 1 100%;
  }
  
  .vgr-cards .card-img-body {
    height: 250px !important;
  }
}

@media (max-width: 480px) {
  .cookie-consent-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-accept-all,
  .btn-necessary-only {
    width: 100%;
    margin-bottom: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #0066cc;
    --text-dark: #000000;
  }
}