:root {
    --primary-color: #0067b8;
    --primary-dark: #004d8c;
    --secondary-color: #f0f0f0;
    --text-light: #f8f8f8;
    --text-dark: #222;
    --accent-color: #0067b8;
    --accent-hover: black;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --container-color: #BBBBBB;
}


h4.light-mode { 

    background-color: black;

}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: var(--transition);
    min-height: 100vh; /* Ensure minimum height */
    overflow-y: auto !important; /* Force scrolling */
    background-color: var(--secondary-color); /* Default background */

}


body.light-mode {
    background-color: #d1d1d1;
    color: var(--text-dark);
}

body.dark-mode {
    background-color: #070e1a;
    color: var(--text-light);
}




.header-container {
    position: relative;
    top: 0;
    bottom: 0;
    left: 0%;
    width: 100%;
    z-index: 1000;
    color: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    background-color: #0067b8;
    height: 82px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
}



.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 2800px;
    margin: 0 auto;
    padding: 0rem;
    bottom: 8%;
    position: relative;
    width: 75%;
    box-sizing: border-box;
    height: 98px;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}

/* Menu wrapper */
.menu-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#theme-toggle {
    background: none;
    border: none; /* Remove border */
    color: inherit;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-right: 1rem;
    transition: var(--transition);
}

body.light-mode #popup-menu #theme-toggle {
    color: var(--text-dark);
    border-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode #popup-menu #theme-toggle {
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.2);
}



/* Menu button */
#menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

body.light-mode #menu-button:hover,
body.dark-mode #menu-button:hover,
#menu-button:hover {
    color: #ffd700 !important; /* Using yellow/gold color for consistency with your theme */
    transform: scale(1.1); /* Optional: adds a subtle scale effect on hover */
}

/* Popup menu */
/* Popup Menu Anchored to Menu Button */
#popup-menu {
    position: fixed;
    top: 80px; /* Position right below its parent */
    right: 15%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: none;
    z-index: 1040;
    min-width: 200px;
    margin-top: 0.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#popup-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
}



body.dark-mode #popup-menu {
    background-color: #2a2a2a;
    color: var(--text-light);
}

/* Base styles for menu buttons */
#popup-menu button:not(#theme-toggle) {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--text-dark); /* Black text in light mode */
}

/* Light mode hover */
body.light-mode #popup-menu button:not(#theme-toggle):hover {
    background-color: #000;
    color: #ffd700; /* Yellow text on hover */
}

/* Dark mode specific styles */
body.dark-mode #popup-menu button:not(#theme-toggle) {
    color: var(--text-light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode #popup-menu button:not(#theme-toggle):hover {
    background-color: #000;
    color: white;
}

/* Touch device support */
@media (hover: none) {
    #popup-menu button:not(#theme-toggle):active {
        background-color: #000;
        color: #ffd700; /* Yellow text for light mode */
    }
    
    body.dark-mode #popup-menu button:not(#theme-toggle):active {
        color: white; /* Keep white text for dark mode */
    }
}

body.dark-mode #popup-menu button {
    color: var(--text-light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#popup-menu button:hover {
    background-color: #f0f0f0;
}

body.dark-mode #popup-menu button:hover {
    background-color: #3a3a3a;
}


body.light-mode #popup-menu #theme-toggle {
    color: var(--text-dark);
    border-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode #popup-menu #theme-toggle {
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.2);
}


main {
    margin-top: 5px;
    padding: 0rem;
    padding-bottom: 4rem;
    min-height: calc(100vh - 80px);
}

.modern-footer {
    /* Fix the rgba value and use CSS custom properties for theme-dependent colors */
    background: var(--footer-bg, rgba(18, 36, 58, 0.95));
    color: var(--footer-text, #ffffff);
    padding: 2rem 0;
    margin-top: auto;
    width: 100%;
    right: 0;
    left: 0;
    position: absolute;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Define the theme variables */
:root {
    /* Light theme */
    --footer-bg: rgba(245, 247, 250, 0.95);
    --footer-text: #2d3748;
    --footer-muted: #4a5568;
}

/* Dark theme */
[data-theme="dark"] {
    --footer-bg: rgba(18, 36, 58, 0.95);
    --footer-text: #ffffff;
    --footer-muted: #a0aec0;
}

.footer-content {
    max-width: 2800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-contact {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
    color: var(--footer-text);
}

.footer-link {
    color: #4ab3f4;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #4ab3f4;
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #7cc5f7;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-copyright {
    color: var(--footer-muted);
    font-size: 0.9rem;
    margin: 0;
}






/* General container styling */
.calculator-container {
    max-width: 70%;
    margin: 2rem auto; /* Space around the calculator container */
    padding: 2rem;
    background-color: rgb(240, 245, 250);
    border-radius: 12px; /* Smooth rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for better depth */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    gap: 2rem; /* Space between elements */
    z-index: 1; /* Ensure proper stacking context */
}

/* Dark mode calculator container */
.dark-mode .calculator-container {
    background-color: rgba(18, 36, 58, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}



/* Dropdown styling */
.dropdown-select {
    width: 100%;
    position: relative;
    left: auto;
    right: auto;
    padding: 0.75rem;
    margin-left: 0rem;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}



.dropdown-select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 91, 187, 0.5);
}

/* Individual calculator styling */
.calculator {
    display: none; /* Hidden by default */
    background-color: white;
    color: #333;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 600px; /* Narrower for better readability */
    box-sizing: border-box; /* Ensure padding is included in width */
    animation: fadeIn 0.3s ease-in-out;
}

.dark-mode .calculator {
    background-color: rgb(30, 50, 75);
    color: white;
}

.calculator.active {
    display: block;
}

/* Calculator titles */
.calculator h2 {
    color: #0056b3;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.dark-mode .calculator h2 {
    color: #80c0ff;
}

/* Form group styling */
.form-group {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack label and input */
    gap: 0.5rem; /* Add spacing between label and input */
}

.form-group label {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.dark-mode .form-group label {
    color: #ddd;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dark-mode .form-control {
    background-color: #2a3a4d;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-control:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 4px rgba(0, 91, 187, 0.25);
}

/* Button styling */
.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    background-color: #007BFF;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.dark-mode .btn {
    background-color: #0056b3;
}

.dark-mode .btn:hover {
    background-color: #003f7f;
}

/* Result display */
.result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: white;
    border: 1px solid black;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.result:not(:empty) {
    display: block;
}

.dark-mode .result {
    background-color: #2a3a4d;
    color: #fff;
    border-left-color: #ffc107;
}

/* Animation for showing calculators */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}










/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}







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

h2 {
    text-align: center;
    color: var(--primary-color);
    margin: 2rem 0;
    font-size: 2rem;
}










/* Pool Service Page Styles */
.service-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('../static/images/pool-service-hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.service-heading {
    margin-bottom: 1.5rem;
    color: white;
}

.service-button {
    background: #007BFF;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.service-button:hover {
    background: #0056b3;
}

/* Scrolling Text Styles */
.scrolling-text-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #13151f;
    padding: 10px 0;
}

.scrolling-text {
    display: inline-block;
    animation: scroll 20s linear infinite;
    color: white;
    font-size: 24px;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Package Styles */
.packages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.package-description {
    text-align: center;
    margin-bottom: 2rem;
    color: #007BFF;
}

/* Default (light mode) styles */
.service-list .section-header h1 {
  color: black;
  text-align: center;
}

/* Dark mode styles */
.dark-mode .service-list .section-header h1 {
  color: white;
  text-align: center;
}



.package-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.package-card {
    background-color: #13151f;
    color: white;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.package-content {
    flex: 1;
}

.package-card h3 {
    color: #007BFF;
    margin-bottom: 1rem;
}

.package-card ul {
    list-style-type: none;
    padding: 0;
}

.package-card li {
    margin-bottom: 1rem;
}

.note {
    font-size: 0.8em;
    font-style: italic;
    color: #888;
    margin-top: 0.5rem;
}

.package-button {
    display: block;
    width: 90%;
    background-color: #007BFF;
    color: white;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.package-button:hover {
    background-color: #0056b3;
}

/* Testimonials Section */
.testimonials-section {
    text-align: center;
    margin: 50px auto;
    max-width: 800px;
    padding: 2rem;
    background-color: #13151f;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.testimonial {
    margin: 2rem 0;
}

.testimonial blockquote {
    border-left: 5px solid #4CAF50;
    margin: 1rem 0;
    padding: 1rem 2rem;
    background-color: #13151f;
    border-radius: 5px;
}

.testimonial footer {
    background-color: #333;
    color: #eee;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: inline-block;
    margin-top: 1rem;
}







.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background: #004d99;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-container button:hover {
    background: #003366;
}

.alert {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}










  

/* Mobile responsiveness */









/* Responsive Design */
@media (max-width: 768px) {




@supports not (env(safe-area-inset-top)) {
    .header-container {
        padding-top: 0; /* Fallback for devices without safe-area support */
    }



/* Fix Packages Container */
    .packages-container {
        max-width: 100%; /* Allow container to fit screen */
        min-width: 80%; /* Remove fixed min-width */
        float: none; /* Remove float for better flexibility */
        padding: 1rem; /* Add padding for spacing */
        box-sizing: border-box; /* Include padding in width */
    }

    /* Fix Package Cards */
    .package-cards {
        max-width: 100%; /* Fit cards within the container */
        min-width: 8%; /* Remove fixed min-width */
        margin: 0 auto; /* Center-align cards */
        padding: 1rem; /* Add padding for spacing */
        display: flex;
        flex-direction: column; /* Stack items vertically */
        gap: 1rem; /* Add spacing between items */
    }



.header-container {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    color: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    background-color: var(--primary-color); /* Or your desired header color */
    padding-top: env(safe-area-inset-top); /* Ensures content respects the notch */
    height: calc(82px + env(safe-area-inset-top)); /* Adjust height to include the safe area */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;

}

body.light-mode .header-container {
    background-color: var(--primary-color);
}

body.dark-mode .header-container {
    background-color: var(--primary-color); /* Dark mode color */
}

header + main {
    padding-top: 82px; /* Offset for fixed header */
}



.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 2800px;
    margin: 0 auto;
    padding: 0rem;
    bottom: 8%;
    position: relative;
    width: 75%;
    box-sizing: border-box;

}





#page-container {

    border: white;
}



 

    .calculator {
        padding: 1.5rem;
    }

   .calculator-tabs {
        flex-direction: row; /* Changed from column */
        gap: 0.25rem; /* Reduced gap further for mobile */
    }

    .tab-button {
        .tab-button {
        padding: 0.5rem;
        font-size: 0.85rem;
        min-width: unset;
    }

    .form-control {
        font-size: 16px;
        padding-right: 0;
        align-items: center;
    }

    .calculator h2 {
        font-size: 1.25rem;
    }
}

.calculator-title {
    text-align: center;
    display: block;
    margin: 0 auto;
}







/* Page title styles */
h2 {
    text-align: center;
    color: var(--primary-color);
    margin: 1rem 0;
    font-size: 2rem;
}

body.dark-mode h2 {
    color: var(--text-light);
}

/* Update the result styles */
.result {
    /* ... existing styles ... */
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.result:not(:empty) {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: highlight 1s ease-out;
}

@keyframes highlight {
    0% {
        background-color: rgba(255, 215, 0, 0.3);
    }
    100% {
        background-color: rgba(255, 255, 255, 0.05);
    }
}








.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.menu-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#menu-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}



#popup-menu.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#popup-menu button {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
}

#popup-menu button:last-child {
    border-bottom: none;
}

#popup-menu button:hover {
    background-color: rgba(0,0,0,0.05);
}

.main-content {
    padding-top: 1rem;
}

/* Dark mode styles */
body.dark-mode #popup-menu {
    background-color: #2a2a2a;
}

body.dark-mode #popup-menu button {
    color: var(--text-light);
    border-bottom-color: rgba(255,255,255,0.1);
}

body.dark-mode #popup-menu button:hover {
    background-color: rgba(255,255,255,0.1);
}









    .footer-content {
        padding: 0 1rem;
    }

    .footer-contact {
        font-size: 1rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }

       .package-cards {
        grid-template-columns: 1fr;
    }

    .service-hero {
        padding: 2rem 1rem;
    }

    .scrolling-text {
        font-size: 18px;
    }
     .menu-toggle-wrapper {
        position: relative;
    }
    
    

 #popup-menu {
        position: absolute;
      
    }
}

    










 



/* Ensure proper positioning when resizing from small to large */
@media (min-width: 769px) {
    .menu-toggle-wrapper {
        position: relative;
    }
    
       #popup-menu {
        position: absolute; !important;
        top: 100% !important;
        right: 15%; !important;
        width: 200px;
        margin-top: 0.5rem;
    }
}





/* Modern Footer Styles */

