/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
:root {
  --brand-red: #c0392b;
  --bg-beige: #ece9d8;
  --text-dark: #333;
  --text-light: #fff;
  --font-main: 'Open Sans', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-beige);
  color: var(--text-dark);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  margin: 1em 0;
  line-height: 1.2;
}

h1 {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 2.2rem;
}

h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 1em 0; }
a { text-decoration: none; transition: opacity 0.3s ease; }
a:hover { opacity: 0.8; }

.btn {
  display: inline-block;
}

/* ==========================================================================
   Layout & Utility Classes
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1040px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.pull-left { float: left; }
.pull-right { float: right; }

.flex-between {
  display: flex;
  justify-content: space-between;
}

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

.intro-text {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem auto;
}

.container > p:not(.intro-text) {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem auto;
}

/* ==========================================================================
   Component Styles
   ========================================================================== */
/* Header */
#header {
  min-height: 50px;
  padding: 15px 0;
  background-color: var(--brand-red);
  color: var(--text-light);
}

#header a { color: var(--text-light); font-weight: 700; }
.phone-number { font-weight: 700; font-size: 1.1rem; }

/* Logo Bar */
#logobar {
  padding: 44px 0;
  background-color: var(--bg-beige);
}

#logobar .logo {
  width: 209px;
  height: 130px;
  background: url("img/logo.png") no-repeat center center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
}

/* Sections */
.content {
  padding: 72px 0;
  font-weight: 300;
}

#services {
  background-color: var(--brand-red);
  color: var(--text-light);
}

#services .container {
  text-align: center;
}

#appointment {
  background-color: var(--bg-beige);
}

#about {
  background-color: var(--brand-red);
  color: var(--text-light);
}

/* Notch Effect */
.section-notch {
  position: relative;
}

.section-notch::after {
  content: '';
  z-index: 10;
  position: absolute;
  bottom: -39px;
  left: 50%;
  border-right: 40px solid transparent;
  border-left: 40px solid transparent;
  transform: translateX(-50%); /* Fix for exact centering */
}

#logobar::after { border-top: 40px solid var(--bg-beige); }
#services::after { border-top: 40px solid var(--brand-red); }
#appointment::after { border-top: 40px solid var(--bg-beige); }

/* Services Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.iconset {
  padding: 20px;
  background: rgba(0,0,0,0.05); /* subtle highlight for modern feel */
  border-radius: 8px;
}

.icon {
  width: 80px;
  height: 105px;
  margin: 0 auto;
}
.third {
  width: 33.333%;
  float: left;
}
.icon-gears { background: url("img/gears.png") no-repeat center center; }
.icon-machine { background: url("img/machine.png") no-repeat center center; }
.icon-wrench { background: url("img/wrench.png") no-repeat center center; }

.icon-gears,
.icon-machine,
.icon-wrench {
  width: 80px;
  height: 105px;
  margin: 0 auto;
  background-size: contain;
}

/* Appointment Layout */
.layout-sidebar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.sidebar {
  flex: 1 1 250px;
}

.main-content {
  flex: 2 1 500px;
}

#appointment #book {
  width: 680px;
  max-width: 100%;
  margin-left: auto;
}

#book iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.iframe-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#cyberOfficeFrame {
  display: block;
  width: 100%;
  min-height: 560px;
  height: 62vh;
  max-height: 660px;
  border: 0;
}

.booking-fallback {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.95rem;
}

.booking-fallback a {
  color: var(--brand-red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.clean-list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.clean-list li:last-child { border-bottom: none; }
.columns-2 {
  column-count: 2;
  column-gap: 20px;
}

/* Footer */
#footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 20px;
  margin-top: 40px;
}

#footer {
  border-top: 1px solid rgba(255,255,255,0.6);
  padding-top: 20px;
  margin-top: 40px;
  text-align: left;
}

/* ==========================================================================
   Mobile & Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 1.95rem;
    letter-spacing: 1.5px;
  }

  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.05rem; }

  .container {
    width: calc(100% - 32px);
  }

  .responsive-stack {
    flex-direction: column;
    text-align: center !important;
    gap: 14px;
  }

  #header {
    padding: 10px 0;
  }

  .phone-number {
    font-size: 1rem;
  }

  #logobar {
    padding: 34px 0 44px;
  }

  #logobar .logo { margin: 0 auto; }

  .slogan.text-right { text-align: center; }

  #header .flex-between {
    flex-direction: column;
    gap: 8px;
  }

  .content {
    padding: 52px 0;
  }

  .intro-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 28px;
  }

  .iconset {
    padding: 22px 20px;
  }

  .icon {
    height: 88px;
    background-size: contain;
  }

  .layout-sidebar-main {
    gap: 28px;
  }

  .main-content {
    order: -1;
    flex-basis: 100%;
  }

  .sidebar {
    flex-basis: 100%;
  }

  #book h4 {
    margin-top: 0;
  }

  .iframe-container {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
    box-shadow: none;
  }

  #cyberOfficeFrame {
    min-height: 700px;
    height: 76vh;
    max-height: none;
  }

  .columns-2 { column-count: 1; }

  .pull-left,
  .pull-right,
  .third {
    float: none;
    width: auto;
  }

  #appointment #book {
    width: 100%;
    margin-left: 0;
  }

  #appointment .sidebar {
    width: 100%;
  }

  #footer-bottom > div {
    text-align: center !important;
    margin-bottom: 15px;
  }

  #footer .pull-left,
  #footer .pull-right {
    display: block;
    text-align: center;
    margin-bottom: 15px;
  }
}

/* Print Styles */
@media print {
  body { background: #fff !important; }
  #services, #about, #footer-bottom { color: black !important; background: transparent !important; }
  .iconset, #book, .section-notch::after { display: none !important; }
  #logobar .logo { text-indent: 0; }
}

@media (max-width: 1000px) {
  .third {
    float: none;
    width: auto;
  }

  #services .iconset {
    max-width: 100%;
    margin: 18px 0;
    text-align: center;
  }

  #appointment #book {
    width: 100%;
    margin-left: 0;
  }

  #book iframe {
    min-height: 560px;
  }

  #footer .pull-left,
  #footer .pull-right {
    display: block;
    float: none;
    text-align: center;
    margin-bottom: 15px;
  }
}
