/*
Theme Name: Phone Link Theme
Theme URI: phonelinkrepair.com.au
Author: [Your Name]
Author URI: [Your Website URL]
Description: Custom theme for Phone Link mobile repair services, targeting Jerrabomberra, Queanbeyan, and Canberra.
Version: 1.0
Text Domain: phonelink-theme
*/

/* --- 1. CSS Variables (Less Repetition) --- */
:root {
  /* Phone Link Brand Colors */
  --phonelink-blue: #5de2e7; /* Primary Light Aqua (Footer & Nav Background) */
  --phonelink-blue-rgb: 93, 226, 231;
  --phonelink-blue-hover: #4acacf; /* Slightly darker hover state */
  --phonelink-dark: #212529; /* Dark text/button color (Original --bs-dark) */

  /* Utility Variables */
  --font-body: "Poppins", sans-serif;
  --header-height-mobile: 60px;
  --header-height-desktop: 80px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --border-radius-base: 0.5rem;
}

/* --- 2. Base & Typography (Mobile-First) --- */
body {
  font-family: var(--font-body);
  padding-top: var(--header-height-mobile);
}

/* --- 2.1 FLUID TYPOGRAPHY (NEW SECTION) --- */

/* Base font size for paragraphs and general text */

/* Fluid Heading Sizes */
h1,
.display-4,
.quote-main-heading,
.enquiry-main-heading {
  /* Scales H1 between 2rem (32px) and 3rem (48px) */
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}

h3,
.card-title {
  /* Scales H3 between 1.5rem (24px) and 2rem (32px) */
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
}

/* Labels and smaller form text */
.form-label,
.quote-label,
.enquiry-label {
  /* Scales slightly for better legibility on larger screens */
  font-size: clamp(0.9rem, 0.5vw + 0.8rem, 1rem);
  font-weight: 600; /* Added font-weight for visibility */
}

/* Utility classes updated to use theme font size */
.service-highlight-list li {
  font-size: clamp(1rem, 0.3vw + 0.9rem, 1.1rem);
}

/* --- END FLUID TYPOGRAPHY --- */

/* Base button and accent color definitions using variables */
.btn-primary,
.btn-accent {
  --bs-btn-bg: var(--phonelink-blue);
  --bs-btn-border-color: var(--phonelink-blue);
  --bs-btn-hover-bg: var(--phonelink-blue-hover);
  --bs-btn-hover-border-color: var(--phonelink-blue-hover);
  --bs-btn-active-bg: var(--phonelink-blue-hover);
  --bs-btn-active-border-color: var(--phonelink-blue-hover);
  color: var(--phonelink-dark);
  font-weight: 600;
}

.text-primary,
.section-icon {
  color: var(--phonelink-blue) !important;
}

/* --- 3. Header/Navigation Styling --- */

/* Navigation Background Color */
.main-nav-phone-link {
  background-color: var(--phonelink-blue);
  border-bottom: 1px solid var(--phonelink-blue-hover);
}

.custom-logo-link img {
  max-height: 40px; /* Mobile height */
  width: auto;
  max-width: 100%;
  border-radius: var(--border-radius-base);
}

/* Custom CTA Buttons (from header.php) */
.btn-quote-outline {
  color: var(--phonelink-dark);
  border: 2px solid var(--phonelink-dark);
  background-color: transparent;
}
.btn-quote-outline:hover {
  color: white;
  background-color: var(--phonelink-dark);
}

.btn-enquiry-dark {
  color: white;
  background-color: var(--phonelink-blue);
  border: 2px solid var(--phonelink-blue);
}
.btn-enquiry-dark:hover {
  color: var(--phonelink-blue);
  background-color: transparent;
}

/* Custom Mobile Responsiveness for CTA Buttons (Moved from inline <style>) */
@media (max-width: 991.98px) {
  .navbar-collapse .mobile-cta-buttons {
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-direction: column;
  }
  .navbar-collapse .mobile-cta-buttons .btn {
    width: 100%;
    margin-top: var(--spacing-sm);
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* --- 4. Hero Section (Responsive Background Video FIX) --- */
.hero-section {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* FIX: Constrain hero height on mobile */
@media (max-width: 767.98px) {
  .hero-section {
    /* Reduced height for mobile to prevent it from consuming too much vertical space */
    height: 60vh;
  }
}

#heroVideo {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -100;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: -99;
}
.hero-section .display-4 {
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- 5. Flip Card Components --- */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 200px;
  perspective: 1000px;
  margin-bottom: var(--spacing-md);
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-base);
}
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-base);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.flip-card-front {
  background-color: #fff;
}
.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.flip-card-back {
  background-color: #ffffff;
  color: var(--phonelink-dark);
  transform: rotateY(180deg);
  font-size: 0.9rem; /* Kept font-size here, as it's less critical, but could be made fluid */
  border: 1px solid #dee2e6;
  text-decoration: none !important;
}
.flip-card-back a {
  text-decoration: none !important;
  color: var(--phonelink-dark);
}
.flip-card-back .btn-light {
  color: var(--phonelink-dark) !important;
  background-color: var(--phonelink-blue-hover);
  border-color: var(--phonelink-blue-hover);
}

/* --- 6. Service Cards & Icons --- */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  /* Added border-radius for consistency with other card designs */
  border-radius: var(--border-radius-base);
}
.service-card:hover {
  /* Using -5px lift and medium shadow for consistent, strong effect */
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

.service-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background-color: var(--phonelink-blue);
  border: 1px solid var(--phonelink-blue-hover);
}
.service-icon-wrapper img {
  /* width: 80%;
  height: 80%; */
  object-fit: contain;
}
.service-icon-wrapper .bi {
  font-size: 2.5rem;
  color: var(--phonelink-dark);
}

/* --- 7. Accordion & About Section --- */
.accordion-button:not(.collapsed) {
  color: var(--phonelink-dark);
  background-color: var(--phonelink-blue);
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--phonelink-blue-rgb), 0.25);
  border-color: var(--phonelink-blue);
}
.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

.about-img {
  border-radius: var(--spacing-md);
  object-fit: cover;
  height: 100%;
  min-height: 300px;
}

/* --- 8. Footer Styling --- */

/* Footer Background Color */
.footer-main-phone-link {
  background-color: var(--phonelink-blue);
  color: var(--phonelink-dark) !important;
}

/* Footer Headings and Links */
.footer-main-phone-link h5 {
  color: var(--phonelink-dark) !important;
}

.footer-menu-list a,
.footer-service-list a,
.footer-info-text {
  color: var(--phonelink-dark) !important;
  transition: color 0.3s ease;
}

.footer-menu-list a:hover,
.footer-service-list a:hover {
  color: var(--phonelink-blue-hover) !important;
}

/* Social Icons */
.social-icon {
  font-size: 1.5rem;
  color: var(--phonelink-dark) !important;
  transition: color 0.3s ease;
}
.social-icon:hover {
  color: var(--phonelink-blue-hover) !important;
}

/* Icon next to service links */
.icon-chevron {
  color: var(--phonelink-dark) !important;
}

/* Copyright Bar Styling */
.footer-copyright-bar {
  border-color: var(--phonelink-dark) !important;
}

.footer-copyright-bar .text-secondary {
  color: var(--phonelink-dark) !important;
}

/* --- 9. Desktop/Tablet Responsiveness --- */

@media (min-width: 992px) {
  body {
    padding-top: var(--header-height-desktop);
  }

  .custom-logo-link img {
    max-height: 50px;
  }
}
/* --- 10. Brand Archive Card Styling --- */

.brand-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-base); /* Use theme variable */
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Ensure the card is white if not explicitly set */
  background-color: #fff;
}
.brand-card:hover {
  transform: translateY(-5px);
  /* Using consistent shadow style */
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}
.card-img-top-brand {
  height: 150px;
  object-fit: contain;
  padding: 1rem;
  /* Use very light gray consistent with background utility classes */
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}
.card-body-custom {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* Ensure brand badge uses the primary color (already defined in Section 2) */
.badge.bg-primary {
  background-color: var(--phonelink-blue) !important;
  color: var(--phonelink-dark) !important;
  font-weight: 600;
}
/* --- 11. Taxonomy Model Grid & Card Styling (taxonomy-brand_category.php) --- */

.brand-list-card .card-title {
  color: var(--phonelink-dark) !important;
}

.brand-list-card .list-group-item {
  color: var(--phonelink-dark) !important;
}

.brand-list-card .list-group-item.active {
  /* Uses theme's primary color for active brand background */
  background-color: var(--phonelink-blue) !important;
  border-color: var(--phonelink-blue-hover) !important;
  color: var(
    --phonelink-dark
  ) !important; /* Text should be dark on the light aqua background */
}

/* FINAL FIX for Badge Colors: Dark background, White text */
.brand-list-card .brand-count-badge {
  background-color: var(--phonelink-dark) !important;
  color: white !important;
}

/* FINAL FIX for Model Grid Header Styling: Dark text */
.col-lg-9 h2.fw-bold {
  color: var(--phonelink-dark) !important;
}

/* Model Grid Cards */
.model-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border-radius: var(--border-radius-base);
}
.model-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}
.model-card .card-img-top {
  max-height: 200px;
  object-fit: contain;
  padding: 1rem;
  background-color: #fff;
  border-top-left-radius: var(--border-radius-base);
  border-top-right-radius: var(--border-radius-base);
}

/* Modal Styling */
#modalTitle {
  color: var(--phonelink-dark) !important;
}
/* --- 12. Single Service Detail Page (single-service.php) --- */

/* --- Layout and Responsiveness --- */

/* Main image container */
.service-image-container {
  height: 350px; /* Default height for mobile/tablet */
  overflow: hidden;
  border-radius: var(--border-radius-base);
  position: relative;
  cursor: pointer;
  box-shadow: var(--bs-box-shadow);
}
.service-image-container:hover .service-main-img {
  transform: scale(1.03);
}
.service-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  /* Optimizing for quick load */
  will-change: transform;
}

/* Desktop adjustment */
@media (min-width: 768px) {
  .service-image-container {
    height: 450px;
  }
}

/* Image gallery trigger overlay */
.image-gallery-trigger {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0.75rem;
  background-color: rgba(
    var(--bs-dark-rgb),
    0.75
  ); /* Using dark theme color with opacity */
  color: white;
  border-top-left-radius: var(--border-radius-base);
  font-size: 0.875rem;
  font-weight: 700;
}

/* --- Content Styling --- */

.service-main-heading {
  /* Ensures h1 is clear and prominent */
  color: var(--phonelink-dark);
}

.service-section-title {
  /* Matches theme's primary accent color */
  color: var(--phonelink-dark) !important;
}

.service-highlight-list .bi {
  color: var(--phonelink-blue) !important;
}

/* --- CTA Buttons --- */

.cta-button-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}
.cta-btn,
.cta-btn-outline {
  /* Ensures buttons take up full width on mobile */
  width: 100%;
  text-align: center;
  font-weight: 600;
}

/* Tablet/Desktop layout for CTA buttons */
@media (min-width: 576px) {
  .cta-button-row {
    flex-direction: row;
    gap: 1.5rem;
  }
  .cta-btn,
  .cta-btn-outline {
    /* Prevents buttons from growing too large on desktop */
    width: auto;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* --- Related Services --- */

.related-services-title {
  color: var(--phonelink-dark);
}
.related-service-card {
  transition: transform 0.2s;
}
.related-service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

/* Wrapper for related card images (to ensure consistent cropping/size) */
.related-card-img-wrapper {
  height: 180px;
  overflow: hidden;
  border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
}
.related-img {
  object-fit: cover !important;
  height: 100%;
  width: 100%;
}
.related-service-card .card-title {
  color: var(--phonelink-dark) !important;
}
.related-view-btn {
  /* Use theme primary button style for accent */
  color: var(--phonelink-dark) !important;
  border-color: var(--phonelink-dark) !important;
}
.related-view-btn:hover {
  color: white !important;
  background-color: var(--phonelink-dark) !important;
}

/* --- Modal Gallery Styling --- */

.modal-gallery-content {
  background-color: transparent !important;
}
.modal-body-gallery .carousel-item {
  height: 60vh; /* Responsive height for modal image area */
  max-height: 800px;
  background-color: var(--phonelink-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body-gallery .modal-carousel-img {
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
}

/* White close button for dark modal background */
.modal-body-gallery .btn-close-white {
  filter: invert(1);
  opacity: 0.8;
}

/* --- 13. Quick Quote Calculator Page (page-quick-quote.php) --- */

.quote-main-heading {
  /* Handled by Fluid Typography h1 */
  color: var(--phonelink-dark) !important;
}

.quote-form-card {
  border-radius: var(--border-radius-lg, 1rem);
}

.quote-label {
  /* Handled by Fluid Typography .form-label */
  color: var(--phonelink-dark);
}

.quote-select {
  /* Standardized selection box styling */
  border-radius: var(--border-radius-base);
  min-height: 48px;
}

/* Result Box Styling */
.quote-result-box {
  border: 1px solid var(--bs-border-color);
  background-color: var(--bs-light); /* Light background for contrast */
  border-radius: var(--border-radius-base);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Specific styling for the actual price output */
#quoteOutput {
  font-size: clamp(1.5rem, 3vw + 1rem, 2.5rem); /* Made fluid */
  font-weight: bold;
  color: var(--phonelink-blue);
}

/* Error/Disclaimer styling */
.quote-result-box #disclaimer {
  font-size: clamp(0.75rem, 0.2vw + 0.7rem, 0.85rem); /* Made fluid */
  font-style: italic;
}

/* --- 14. Quick Enquiry Page (page-quick-enquiry.php) --- */

.enquiry-main-heading,
.enquiry-section-title {
  color: var(--phonelink-dark);
}
.enquiry-main-heading {
  /* Larger spacing for the H1 */
  margin-bottom: 2rem;
}

.enquiry-form-card {
  border-radius: var(--border-radius-lg, 1rem);
  padding: 2.5rem !important; /* Ensure padding is generous */
}

.enquiry-label {
  /* Handled by Fluid Typography .form-label */
  font-weight: bold;
  color: var(--phonelink-dark);
}

.enquiry-input,
.enquiry-select {
  border-radius: var(--border-radius-base);
  min-height: 48px;
}

/* Specific style for the submit button */
.enquiry-submit-btn {
  font-weight: 600;
  transition: background-color 0.2s;
}

/* Override Bootstrap's default alert margin for the message container */
#directEnquiryMessage .alert {
  margin: 0;
}
/* ==========================================================================
   1. GLOBAL RESET & GAP FIXES
   ========================================================================== */
/* Make Arrows and Dots visible on any background */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.4); /* Dark circle background */
  border-radius: 50%;
  background-size: 60%;
  width: 45px;
  height: 45px;
}

.carousel-indicators [data-bs-target] {
  background-color: #000; /* Makes dots black so they show on light images */
  width: 12px;
  height: 12px;
  border-radius: 50%; /* Makes dots circular */
  margin: 0 5px;
}

.carousel-indicators .active {
  background-color: var(--phonelink-blue);
}

/* Speed of slide transition */
.carousel-item {
  transition: transform 0.6s ease-in-out;
}

/* Ensure no gap between navbar and slider */
#heroSlider {
  margin-top: 0;
}
.carousel-item img {
  width: 100%;
  height: auto !important; /* This allows the image to shrink/grow naturally */
  max-height: 90vh; /* Optional: prevents it from being too tall on huge screens */
  display: block;
}

/* Remove fixed heights from the container too */
.carousel-item {
  height: auto !important;
}
