@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary: hsl(24, 100%, 50%);         /* Vibrant Orange */
  --primary-hover: hsl(24, 100%, 42%);   /* Darker Orange for hovers */
  --primary-dark: hsl(24, 90%, 30%);     /* Deep Rust Orange for dark headings */
  --primary-light: hsl(24, 100%, 97%);   /* Warm White/Light Orange */
  --primary-glow: hsla(24, 100%, 50%, 0.15); /* Orange shadow/glow */
  --secondary: hsl(35, 100%, 55%);       /* Bright Peach/Amber */
  
  --bg-main: hsl(24, 25%, 98%);          /* Ultra light warm background */
  --bg-card: hsl(0, 0%, 100%);           /* Pure White for cards */
  --bg-glass: rgba(255, 255, 255, 0.9);  /* Glassmorphism background */
  
  --text-main: hsl(215, 25%, 15%);       /* Deep Charcoal for high contrast text */
  --text-muted: hsl(215, 12%, 45%);      /* Muted gray-blue for helper text */
  --text-light: hsl(0, 0%, 100%);        /* White text */
  
  --border: hsl(24, 20%, 90%);           /* Soft warm gray for borders */
  --border-focus: hsl(24, 100%, 65%);    /* Bright orange border for input focus */
  
  --shadow-sm: 0 2px 8px rgba(24, 15, 5, 0.04);
  --shadow-md: 0 10px 25px rgba(24, 15, 5, 0.06);
  --shadow-lg: 0 20px 40px rgba(24, 15, 5, 0.1);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-round: 50%;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.85rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Structural Layout */
#wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
#header {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

#site-logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.logo-svg {
  width: 45px;
  height: 45px;
  transition: var(--transition);
}

.logo-link:hover .logo-svg {
  transform: rotate(10deg) scale(1.05);
}

.logo-text span {
  color: var(--primary);
}

/* Nav Menu */
.navwrap {
  display: flex;
  align-items: center;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  padding-left: 0;
  margin-bottom: 0;
}

.menu li {
  position: relative;
  margin-bottom: 0;
}

.menu a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.menu a:hover, 
.menu li.active-trail > a {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}

/* Dropdown Menu CSS */
.menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 0.5rem;
  z-index: 101;
  margin-top: 0.5rem;
}

.menu li ul li {
  margin-bottom: 0;
}

.menu li ul a {
  display: block;
  padding: 0.6rem 1rem;
}

.menu li:hover > ul {
  display: flex;
}

/* Dropdown Sub-menus alignment */
.menu li ul ul {
  left: 100%;
  top: 0;
  margin-top: 0;
  margin-left: 0.5rem;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-dark);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Main Content Grid */
#main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

#primary {
  min-width: 0; /* Prevents overflow */
}

/* Page Intro/Hero */
.page-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, hsl(24, 100%, 94%) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  border-radius: var(--radius-round);
}

.page-header h1 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0;
  max-width: 700px;
}

/* Flex Container Grid */
.flex-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.flex-container > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.flex-container > div:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.flex-container img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.flexcaption {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.75rem;
}

.flexcaption a {
  color: var(--primary-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
}

.flexcaption a::after {
  content: '→';
  transition: var(--transition);
}

.flex-container > div:hover .flexcaption a {
  color: var(--primary);
}

.flex-container > div:hover .flexcaption a::after {
  transform: translateX(5px);
}

/* Sidebar Styling */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.block h2 {
  font-size: 1.3rem;
  border-bottom: 2px solid var(--primary-glow);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

/* Rotating testimonial styles */
.testimonial-widget {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.25rem;
}

.testimonial-text::before {
  content: '“';
  font-size: 3rem;
  color: var(--primary-glow);
  position: absolute;
  left: -5px;
  top: -15px;
  font-family: var(--font-heading);
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.testimonial-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Side Portfolio card */
.portfolio-side-card {
  text-align: center;
}

.portfolio-side-card img {
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--primary-light);
  padding: 0.5rem;
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
}

/* Footer Bottom styling */
#footer-bottom {
  background-color: var(--primary-dark);
  color: var(--text-light);
  margin-top: auto;
  padding: 3rem 0;
  border-top: 5px solid var(--primary);
}

.footer-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 2.5rem;
}

.footer-column h3 {
  color: var(--secondary);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-column p, 
.footer-column address {
  color: hsl(24, 40%, 85%);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: normal;
  margin-bottom: 0.5rem;
}

.footer-column address span {
  display: block;
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

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

.footer-links a {
  color: hsl(24, 40%, 85%);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-light);
  padding-left: 3px;
  text-decoration: none;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-light);
}

.footer-logo-text span {
  color: var(--secondary);
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-top: 1px solid hsl(24, 90%, 25%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: hsl(24, 40%, 80%);
}

.footer-bottom-bar a {
  color: hsl(24, 40%, 80%);
}

.footer-bottom-bar a:hover {
  color: var(--text-light);
}

/* Contact Info list */
.contact-info-list {
  list-style: none;
  padding-left: 0;
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.contact-info-list svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn:hover {
  background-color: var(--primary-hover);
  color: var(--text-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: none;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Forms & Interactive Components */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: var(--bg-card);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.alert-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-success {
  background-color: hsl(120, 40%, 93%);
  color: hsl(120, 60%, 25%);
  border: 1px solid hsl(120, 40%, 85%);
}

.alert-error {
  background-color: hsl(0, 70%, 95%);
  color: hsl(0, 70%, 30%);
  border: 1px solid hsl(0, 70%, 90%);
}

/* Cookie consent banner styling */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  z-index: 1000;
  display: none;
  animation: slideUp 0.4s ease-out;
}

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

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Service Detail Cards */
.service-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.service-icon-box {
  background-color: var(--primary-light);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid var(--primary-glow);
}

.service-icon-box svg {
  width: 32px;
  height: 32px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
}

/* Email Config Tool on Support Page */
.email-calculator {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 2rem 0;
}

.calc-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.calc-tab {
  background: none;
  border: none;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.calc-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.calc-content {
  display: none;
}

.calc-content.active {
  display: block;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.settings-table th, 
.settings-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.settings-table th {
  background-color: hsl(24, 20%, 93%);
  color: var(--primary-dark);
  font-weight: 600;
}

.code-snippet {
  font-family: monospace;
  background: #f1f3f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #c92a2a;
}

/* Team Grid on About Page */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.team-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--text-light);
  font-size: 2rem;
  font-weight: 800;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.team-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Portfolio Filters & Grid */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-btn:hover, 
.filter-btn.active {
  background: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.portfolio-img-container {
  height: 180px;
  position: relative;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.portfolio-img-container img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: var(--transition);
}

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

.portfolio-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-dark);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
}

.portfolio-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-body h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.portfolio-body p {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.portfolio-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.portfolio-link:hover {
  color: var(--primary-hover);
}

/* Responsive Styles */
@media (max-width: 992px) {
  #main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  #header {
    padding: 0.75rem 0;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .navwrap {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  
  .navwrap.open {
    max-height: 400px;
    overflow-y: auto;
  }
  
  .menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 1rem 0;
  }
  
  .menu li {
    width: 100%;
  }
  
  .menu a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }
  
  /* Disable absolute dropdowns on mobile */
  .menu li ul {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--primary-glow);
    border-radius: 0;
    margin-left: 1.5rem;
    margin-top: 0;
    background: transparent;
    padding: 0;
    display: none;
  }
  
  .menu li.active > ul, 
  .menu li:hover > ul {
    display: flex;
  }
  
  .menu li ul ul {
    margin-left: 1rem;
    left: 0;
  }

  .page-header {
    padding: 1.75rem;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .portfolio-filters {
    justify-content: center;
  }
}
