/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Handling Updates
-----------------------------------------------------------------*/

:root {
	--cnvs-themecolor: #009290;
	--cnvs-themecolor-rgb: 0, 146, 144;

	--cnvs-body-font: "Roboto", sans-serif;
	--cnvs-primary-font: 'Oswald', sans-serif;

	--cnvs-btn-skew: 15deg;

	--cnvs-section-bg: #cdcdcd;

	--cnvs-section-margin: 5.5rem;
}

/* Target Bootstrap columns specifically for mobile single column */

@media (max-width: 768px) {
    
    /* Target the specific section with the family content */
    #content .container .container {
        padding: 15px !important;
    }
    
    /* Force Bootstrap rows to stack */
    #content .row {
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Force ALL Bootstrap columns to full width */
    #content .col-1,
    #content .col-2, 
    #content .col-3,
    #content .col-4,
    #content .col-5,
    #content .col-6,
    #content .col-7,
    #content .col-8,
    #content .col-9,
    #content .col-10,
    #content .col-11,
    #content .col-12,
    #content [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 20px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Remove card styling completely */
    #content .content-section,
    #content .content-block,
    #content .highlight-card,
    #content .leadership-card,
    #content .initiative-card,
    #content .specialty-card,
    #content .event-category,
    #content .timeline-section,
    #content .sidebar-info {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 0 25px 0 !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    /* Clean typography */
    #content p {
        margin-bottom: 18px !important;
        line-height: 1.6 !important;
        text-align: left !important;
    }
    
    #content h2 {
        margin: 25px 0 15px 0 !important;
        font-size: 1.4em !important;
        clear: both !important;
    }
    
    #content h3 {
        margin: 20px 0 12px 0 !important;
        font-size: 1.2em !important;
        clear: both !important;
    }
    
    #content h4 {
        margin: 18px 0 10px 0 !important;
        font-size: 1.1em !important;
        clear: both !important;
    }
    
    /* Lists */
    #content ul {
        padding-left: 20px !important;
        margin-bottom: 15px !important;
    }
    
    #content li {
        margin-bottom: 6px !important;
        line-height: 1.5 !important;
    }
    
    /* Special sections */
    #content .section-header {
        margin-bottom: 20px !important;
        text-align: center !important;
    }
    
    #content .quote-section {
        padding: 25px 15px !important;
        margin: 30px 0 !important;
        text-align: center !important;
        background: #f5f5f5 !important;
        border-radius: 5px !important;
    }
    
    #content blockquote {
        margin-bottom: 15px !important;
        line-height: 1.6 !important;
        font-size: 1.1em !important;
        font-style: italic !important;
    }
    
    #content .conclusion-section {
        padding: 20px 0 !important;
        margin-top: 30px !important;
    }
    
    /* Images */
    #content img {
        max-width: 100% !important;
        height: auto !important;
        margin: 15px 0 !important;
        display: block !important;
    }
}

/* Google sheets formatting */

#table td {
  text-align: left !important;
  padding: 8px 12px !important;
}

#table td:nth-child(2) {
  text-align: center !important;
  font-weight: bold;
}

#table td:nth-child(3), 
#table td:nth-child(4) {
  text-align: right !important;
}

#table th {
  text-align: center !important;
}


/* Hide hero background image on mobile devices */
/* @media screen and (max-width: 768px) { */
  /* Method 1: If the image is set as a background-image on an element */
  /* .hero-section,
  .hero-bg,
  #hero,
  [style*="hero-bg2.jpg"] {
    background-image: none !important;
    display: none !important;
  } */
  
  /* Method 2: If it's an img tag with specific class or src */
  /* img[src*="hero-bg2.jpg"],
  .hero-background-img {
    display: none !important;
  } */
  
  /* Method 3: If you know the specific element ID or class name */
  /* #hero-background,
  .hero-bg2 {
    display: none !important;
  } */
/* } */

/* ===================================================
   RESPONSIVE HERO IMAGE SWITCHING
   Add this to your custom.css file
=================================================== */

/* ===================================================
   FIXED MOBILE HERO IMAGE CSS - Common Issues Resolved
=================================================== */

/* Desktop/Default Hero Image - FIXED PATH */
.hero-section,
#hero,
.hero-background {
  background-image: url('../demos/spra/images/hero-bg2.jpg'); /* Added ../ to go up from css folder */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll; /* Changed from fixed - fixes iOS Safari issues */
  min-height: 600px;
  position: relative;
  width: 100%; /* Ensure full width */
}

/* Mobile Fixes - FIXED PATHS */
@media screen and (max-width: 768px) {
  .hero-section,
  #hero,
  .hero-background {
    background-image: url('../demos/spra/images/hero-mobile2.jpg') !important; /* Fixed path */
    background-attachment: scroll !important; /* Critical for mobile */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 300px !important;
    width: 100% !important;
    /* Fix for zero height issue */
    height: auto !important;
    display: block !important;
    
    /* Vendor prefixes for better mobile support */
    -webkit-background-size: cover !important;
    -moz-background-size: cover !important;
    -o-background-size: cover !important;
  }
  
  /* Force element to have content/height if it's empty */
  .hero-section:empty,
  #hero:empty,
  .hero-background:empty {
    min-height: 300px !important;
    content: "" !important;
  }
}

/* Tablet View - FIXED PATH */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-section,
  #hero,
  .hero-background {
    background-image: url('../demos/spra/images/hero-tablet.jpg'); /* Fixed path */
    background-attachment: scroll; /* Also remove fixed for tablets */
    min-height: 500px;
    background-position: center center;
  }
}

/* ===================================================
   ALTERNATIVE METHOD: Separate Mobile Elements
   Use this if the above doesn't work
=================================================== */

/* Hide desktop hero on mobile, show mobile version */
@media screen and (max-width: 768px) {
  /* Hide desktop version */
  .desktop-hero,
  .hero-section.desktop {
    display: none !important;
  }
  
  /* Show mobile version - FIXED PATH */
  .mobile-hero {
    display: block !important;
    background-image: url('../demos/spra/images/hero-mobile2.jpg') !important; /* Fixed path */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    min-height: 300px !important;
    width: 100% !important;
    
    /* Fallback color in case image doesn't load */
    background-color: #cdcdcd !important;
  }
}

/* Show desktop version on larger screens */
@media screen and (min-width: 769px) {
  .desktop-hero,
  .hero-section.desktop {
    display: block !important;
    background-image: url('../demos/spra/images/hero-bg2.jpg'); /* Fixed path */
    background-size: cover;
    background-position: center center;
    background-attachment: scroll; /* Keep as scroll for better performance */
    min-height: 600px;
  }
  
  .mobile-hero {
    display: none !important;
  }
}

/* ===================================================
   DEBUGGING STYLES - Since debug content shows, the issue is image loading
=================================================== */

/* Next debugging step: Check if image path is correct */
/* @media screen and (max-width: 768px) {
  .hero-section,
  #hero,
  .hero-background { */
    /* Temporarily use a solid color to confirm element is there */
    /* background-color: #009290 !important; Your theme color */
    /* border: 2px solid red !important;
  }
  
  .hero-section::after,
  #hero::after,
  .hero-background::after {
    content: "Element visible - Image path issue?" !important;
    display: block !important;
    color: white !important;
    font-weight: bold !important;
    padding: 20px !important;
    text-align: center !important;
    background: rgba(0,0,0,0.7) !important;
  }
} */

/* ===================================================
   IMAGE SIZE REQUIREMENTS FOR MOBILE:
   
   CRITICAL: Make sure your mobile images are under these limits:
   - Mobile Safari: Max 1024px width recommended
   - File size: Under 1MB for mobile
   - Dimensions: 480px × 270px to 768px × 432px works best
   
   Current recommended sizes:
   - hero-mobile.jpg: 480px × 270px (under 500KB)
   - hero-tablet.jpg: 1024px × 576px (under 800KB)
   - hero-bg2.jpg: 1600px × 900px (under 1.5MB)
=================================================== */

/* Default for desktop */
#spbra-finals-ad {
  width: 800px;
  height: 400px;
}

/* Tablet */
@media (max-width: 768px) {
  #spbra-finals-ad {
    width: 100%;
    height: 300px;
  }
}

/* Mobile */
@media (max-width: 350px) {
  #spbra-finals-ad {
    width: 100%;
    height: 250px;
  }
}

.navbar-offset {
    margin-top: 210px; /* Adjust this value based on your navbar height */
}

/* Default/Desktop styles */
.navbar-offset {
    margin-top: 210px;
}

/* Large tablets and small laptops */
@media (max-width: 1024px) {
    .navbar-offset {
        margin-top: 140px;
    }
}

/* Standard tablets */
@media (max-width: 768px) {
    .navbar-offset {
        margin-top: 120px;
    }
}

/* Large phones */
@media (max-width: 576px) {
    .navbar-offset {
        margin-top: 100px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .navbar-offset {
        margin-top: 80px;
    }
}

/* Very small phones */
@media (max-width: 375px) {
    .navbar-offset {
        margin-top: 70px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-offset {
        margin-top: 160px; /* Smaller margin for mobile */
    }
}

.form-process {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.form-process.active {
    display: flex;
}

.css3-spinner {
    text-align: center;
}

.css3-spinner-scaler {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #000;
    background: #f0f0f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}