/* ============================= */
/* CSS Variables (Theme)        */
/* ============================= */
:root {
  /* Colors */
  --color-bg-primary: #0d1b2a;
  --color-bg-secondary: #1b2a41;
  --color-bg-header: #12243a;
  --color-text-primary: #e0e6ed;
  --color-text-secondary: #c9d4e6;
  --color-accent: #f0c808;
  --color-accent-dark: #d4a017;
  --color-border: #0d1b2a;

  /* Typography */
  --font-family-base: 'Segoe UI', sans-serif;
  --font-size-base: 1rem;    /* 16px */
  --line-height-base: 1.6;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border radius & shadows */
  --radius: 0.5rem; /* 8px */
  --shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);

  /* Breakpoints */
  --bp-mobile-max: 48rem;   /* 768px */
  --bp-tablet-max: 87.5rem; /* 1400px */
  --bp-desktop-max: 100rem; /* 1600px */
}

/* ============================= */
/* Base Reset & Body             */
/* ============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 100%; /* 16px */
}
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}
a {
  color: inherit;
  text-decoration: none;
}

/* ============================= */
/* Header & Navigation           */
/* ============================= */
.header {
  background-color: var(--color-bg-header);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}
.header .container {
  display: flex;
  align-items: flex-end; /* nav aligns bottom */
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm);
  height: 7.5rem; /* ~120px */
}
.logo-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
}
.logo {
  height: 3.5rem; /* ~56px */
  width: auto;
  display: block;
}
/* Navigation */
/*nav {
  display: flex;
  align-items: flex-end;
}*/
nav ul {
  display:flex;
  align-items: flex-end;
  list-style: none;
  gap: 1.25rem; /* 20px */
  padding: 0 var(--spacing-md);
}
nav li a {
  font-weight: bold;
  font-size: 1.125rem; /* ~18px */
  color: var(--color-text-primary);
  display: block;
  padding: var(--spacing-xs) var(--spacing-sm);
}
nav li a:hover,
nav li a:focus {
  color: var(--color-accent);
}
nav li a.active {
  color: var(--color-accent);
}
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-text-primary);
}
nav ul.show {
  display: flex !important;
  background: rgba(18, 36, 58, 0.97);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
}
  nav ul.show li a {
    display: block;
    padding: 0.75rem var(--spacing-md);
    text-align: left;
  }

/* ============================= */
/* Section Scroll Margin         */
/* ============================= */
#philosophy,
#journey,
#cases,
#services {
  scroll-margin-top: 7.25rem; /* ~116px to account for sticky header */
}

/* ============================= */
/* Hero Section                  */
/* ============================= */
.hero {
  min-height: 60vh;
  background: url('../img/04 Cloud Security Monitoring - Incident Response v6 - fit.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(21, 21, 21, 0.5);
}
.hero .hero-content {
  position: relative;
  z-index: 1;
  padding: var(--spacing-md);
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}
.hero p {
  font-size: 1.5rem;
}

/* ============================= */
/* Card Grid (Homepage Sections) */
/* ============================= */
.cards {
  display: grid;
  grid-template-columns: 1fr; /* mobile default */
  grid-auto-rows: auto;      /* let content determine height */
  gap: 1.25rem;              /* 20px */
  padding: 2.5rem 5%;
}
@media (min-width: 48rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 87.5rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 100rem) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
    max-width: 150rem; /* ~2400px cap */
    margin: 0 auto;
  }
}

/* ============================= */
/* Card Component                */
/* ============================= */
.card {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
}
.card h2 {
  font-size: 1.5rem;
  color: var(--color-accent);
  border-bottom: 1px solid rgba(240, 200, 8, 0.33);
  padding-bottom: 0.5rem;
  margin-bottom: var(--spacing-md);
}
.card p,
.card li,
.card ul {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: var(--line-height-base);
}
.card p {
  margin-bottom: var(--spacing-md);
}
.card p:last-child {
  margin-bottom: 0;
}
.card ul {
  padding-left: 1.25rem;
}
.card li {
  margin-bottom: 0.75rem;
}
.card ol {
  list-style-type: decimal;
  /* Similar to padding-left: 1.6rem; in original, use spacing variables */
  padding-left: 1.5rem;  /* ~1.5rem ≈ 24px; adjust as needed */
  margin-top: 0.5rem;    /* ~0.5rem gives space before list */
}
.card ol li {
  margin-bottom: 0.5rem; /* ~8px spacing between items */
}
.card ol li p {
  margin: 0 0 0.375rem; /* ~6px bottom margin: 0.375rem at 16px base */
}
.learn-more {
  margin-top: auto; /* push to bottom if flex */
  cursor: pointer;
  color: var(--color-accent);
  font-weight: bold;
  align-self: flex-start;
}
.learn-more:hover,
.learn-more:focus {
  color: var(--color-accent-dark);
}

/* Spacing after intro paragraphs in cards */
#use-cases-intro p,
#services-intro p {
  margin-bottom: var(--spacing-sm);
}

/* ============================= */
/* Use Cases Page                */
/* ============================= */
main.container {
  padding: 2.5rem 5%;
  max-width: 75rem; /* ~1200px */
  margin: 0 auto;
}
section.use-case {
  margin-bottom: 3.75rem; /* ~60px */
  padding-bottom: 1.875rem; /* ~30px */
  border-bottom: 1px solid var(--color-bg-secondary);
}
section.use-case h2 {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}
.use-case-flex {
  display: flex;
  gap: 1.875rem; /* ~30px */
  flex-wrap: wrap;
  align-items: flex-start;
}
.use-case-text {
  flex: 1 1 60%;
  min-width: 18.75rem; /* ~300px */
}
.use-case-text h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
}
.use-case-text p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}
.use-case img {
  max-width: 100%;
  flex: 1 1 35%;
  height: auto;
  border: 1px solid #2e3a4d;
  border-radius: var(--radius);
  margin: 0;
}
/* ============================= */
/* New Services Page Styles          */
/* ============================= */
.services-accordion {
  margin-top: var(--spacing-lg);
}

/* Style the <summary> element */
.services-accordion summary {
  cursor: pointer;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1.25rem;
  list-style: none; /* remove default marker */
  margin-bottom: var(--spacing-sm);
}

/* Hover/focus */
.services-accordion summary:hover,
.services-accordion summary:focus {
  background-color: rgba(27, 42, 65, 0.8);
}

/* Remove default triangle marker if desired, and add custom icon */
.services-accordion summary::-webkit-details-marker {
  display: none;
}
.services-accordion summary::before {
  content: "▶"; /* closed arrow */
  display: inline-block;
  margin-right: var(--spacing-sm);
  transition: transform 0.2s ease;
}
/* Rotate arrow when open */
.services-accordion details[open] summary::before {
  content: "▼"; /* or rotate the ▶ */
}

/* Accordion content */
.accordion-content {
  background-color: var(--color-bg-secondary);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.accordion-content ul{
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: var(--spacing-md); 
}
.accordion-content p,
.accordion-content ul,
.accordion-content li {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  /*margin-bottom: 0.75rem;*/
  line-height: var(--line-height-base);
  color: var(--color-text-secondary);
}
.accordion-content h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

/* Ensure only summary has margin-bottom; content margin below handled inside */
.services-accordion details:last-child .accordion-content {
  margin-bottom: 0;
}
/* ============================= */
/* Services Page Styles          */
/* ============================= */
#services-page h1 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-accent);
}
.service-item ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: var(--spacing-md);
}
.service-item ul li {
  margin-bottom: 0.75rem;
  line-height: var(--line-height-base);
  color: var(--color-text-secondary);
}
/* CTA button for Services */
.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  margin-top: var(--spacing-md);
  font-weight: bold;
}
.btn:hover,
.btn:focus {
  background-color: var(--color-accent-dark);
}
.cta-wrapper {
  text-align: center;
  margin-top: var(--spacing-lg);
}
/* ============================= */
/* Contact Page Styles           */
/* ============================= */
/* Scope under #contact-page to avoid affecting other .cards-intro sections */
#contact-page .cards-intro {
  text-align: left;
  margin: var(--spacing-lg) 0;
}

/* Center the heading and paragraph, constrain width */
#contact-page .cards-intro h1,
#contact-page .cards-intro p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  color: var(--color-text-primary);
  /* If you want a bit of spacing between h1 and p: */
  /* h1 already has margin-bottom; p follows */
}

/* Style for the form wrapper section */
#contact-page .cards-intro:nth-of-type(2) {
  /* Center the form wrapper too; margin already set above */
  /* Optionally give a subtle background/card look: */
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius);
}

/* Contact form styling */
#contact-page .contact-form {
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  /* Remove any inline styles in HTML and rely on CSS here */
}

/* Labels */
#contact-page .contact-form label {
  display: block;
  color: var(--color-text-primary);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  text-align: left;
}

/* Inputs and textarea */
#contact-page .contact-form input[type="text"],
#contact-page .contact-form input[type="email"],
#contact-page .contact-form textarea {
  width: 100%;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: var(--line-height-base);
  font-family: var(--font-family-base);
  text-align: left;
}

/* Textarea specifics */
#contact-page .contact-form textarea {
  resize: vertical;
}

/* Focus styles for inputs/textarea */
#contact-page .contact-form input:focus,
#contact-page .contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
}

/* Submit button */
#contact-page .contact-form button[type="submit"] {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  margin-top: var(--spacing-sm);
}

/* Hover/focus for button */
#contact-page .contact-form button[type="submit"]:hover,
#contact-page .contact-form button[type="submit"]:focus {
  background-color: var(--color-accent-dark);
}
#contact-page .contact-form button[type="submit"]:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================= */
/* Footer                        */
/* ============================= */
footer {
  background-color: var(--color-bg-header);
  color: #aaa;
  text-align: center;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 0.9rem;
  margin-top: var(--spacing-lg);
}
footer a {
  color: inherit;
}
footer a:hover,
footer a:focus {
  color: var(--color-accent);
}

/* ============================= */
/* Sticky Footer Layout          */
/* ============================= */
/* Ensure html and body fill full viewport height */
html {
  height: 100%;
}
body {
  /* Preserve any existing body rules; here we add flex layout */
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* ensure body at least full viewport */
}

/* Let the main content area expand to push footer down */
main.container {
  flex: 1 0 auto; /* grow as needed, so footer is pushed to bottom when content is short */
}

/* Footer already has margin-top: var(--spacing-lg);
   With body flex layout, footer will sit at bottom if content is short. */
/* Responsive padding adjustments */

/* ============================= */
/* Responsive Adjustments        */
/* ============================= */
/* Mobile-first: default shows hamburger hidden until mobile */
@media (max-width: 48rem) {
  .header .container {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-md);
    height: auto;
  }
  .hamburger {
    display: block !important;
  }
  /* Hide nav list by default */
  nav ul {
    display: none;
    list-style: none;
  }
  /* Show when .show class is toggled via JS */
  nav ul.show {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: var(--spacing-lg);
    width: 12rem; /* ~180px */
    background: rgba(18, 36, 58, 0.97);
    padding: var(--spacing-md) 0;
    z-index: 1000;
  }
  
  nav ul.show li a {
    display: block;
    /*padding: 0.75rem var(--spacing-md);*/
    padding: 0;
    text-align: left;
  }

     /* nav ul {
    display: none;
flex-direction: column;
    gap: 0;
  }*/

 /* nav ul.show {
    display: block;
    position: absolute;
    top: 100%;
    right: var(--spacing-lg);
    width: 12rem; /* ~180px */
   /* background: rgba(18,36,58,0.97);
    padding: var(--spacing-md) 0;
  }*/
  /*nav ul.show {
    display: flex;
    flex-direction: column;
    background: rgba(18,36,58,0.97);
    position: absolute;
    top: 100%;
    right: var(--spacing-lg);
    width: 12rem;
    padding: var(--spacing-md) 0;
    z-index: 1000; /* ensure it appears above content */
 /* }
  nav ul.show li + li {
    margin-top: 0; /* spacing between items can be handled via padding on links */
  /*}*/

  .cards {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .use-case-flex {
    flex-direction: column;
  }
  .services-accordion summary {
  font-size: 1rem;
  }
  #contact-page .cards-intro h1,
  #contact-page .cards-intro p,
  #contact-page .contact-form {
    padding: 0 var(--spacing-md);
  }
}

/* Tablet & small desktop */
@media (min-width: 49rem) and (max-width: 87.5rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    padding: 1.875rem 5%;
    gap: 1.5rem;
  }
  .header .container {
    padding: var(--spacing-sm) var(--spacing-md);
    height: 6.25rem; /* ~100px */
  }
  .logo {
    height: 3rem; /* ~50px */
  }
  .hero {
    min-height: 50vh;
    padding: 0 var(--spacing-sm);
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
 .hamburger{
    display: none !important;
  }
  nav ul {
    display: flex !important;
    gap: 0.875rem; /* 14px */
    align-items: flex-end;
  }
  .card h2 {
    font-size: 1.4rem;
  }
  .card p,
  .card li,
  .card ul {
    font-size: 0.95rem;
  }
  footer {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
  }
}

/* Medium / Large Desktop */
@media (min-width: 101) and (max-width:150rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    padding: var(--spacing-lg) 5%;
    gap: 1.5rem;
    max-width: none;
  }

}

/* Extra-Large Desktop */
@media (min-width: 151rem ) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    padding: var(--spacing-lg) 5%;
    gap: 1.5rem;
    max-width: 150rem; /* ~2400px */
    margin: 0 auto;
  }

}
