body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Allow main content to grow and push footer down */
    padding-bottom: 0; /* No extra padding needed */
}

main.pb7 {
    padding-bottom: 0 !important;
}

body a {
    color: #ff0000;
    text-decoration: none;
}

.nested-links a {
    color: #ff0000;
    text-decoration: none !important;
    overflow-wrap: break-word;
    transition: color 0.15s ease-in;
}

.nested-links a:focus,.nested-links a:hover{
    color:#812929;transition:color .15s ease-in
}

header {
    background-color: #fff;
    padding: 1rem;
    position: static;
    top: auto;
    z-index: auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav a.logo .zak {
    color: #ff0000;
}

nav a.logo .tec {
    color: #000000; 
}

nav a.logo {
    font-size: 3.75rem;
    line-height: 1.5;
    /* font-weight: bold; */
}

/* Navigation menu text */
nav .fr-ns a {
    font-size: 1rem; /* Smaller size for menu items */
}

/* Desktop: Left-aligned logo, right-aligned nav */
@media screen and (min-width: 30em) {
    nav a.logo {
        margin-right: 1rem;
    }
    nav .fr-ns {
        text-align: right;
    }
}

/* Mobile: Logo on top, nav below, centered */
@media screen and (max-width: 30em) {
    nav a.logo {
        margin-bottom: 1rem;
        text-align: center;
    }
    nav .fr-ns {
        text-align: center;
    }
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #000;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2); /* Scales the icon to 120% of its size */
    animation: bounce 0.4s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.4); /* Slightly larger for bounce effect */
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    position: relative; 
    display: inline-block;
}

/* Base styles for sliding lines */
nav ul li a::after,
nav ul li a::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #ff0000;
    transform: scaleX(0);
    transition: transform 0.4s ease-out;
}

/* Position and transform origin for underline */
nav ul li a::after {
    bottom: -5px;
    left: 0;
    transform-origin: right;
}

/* Position and transform origin for overline */
nav ul li a::before {
    top: -5px;
    left: 0;
    transform-origin: left;
}

nav ul li a.active,
nav ul li a:hover {
    color: #ff0000;
}

/* Show sliding lines for hover and active states */
nav ul li a.active::after,
nav ul li a.active::before,
nav ul li a:hover::after,
nav ul li a:hover::before {
    transform: scaleX(1);
}

.hero {
    background-color: #3b3b3b;
    color: #fff;
    z-index: 1;
    text-align: center;
    padding: calc(1.5vh + 0.25rem) calc(0.75vw + 0.25rem); /* Reduced base padding for better mobile fit */
}

.banner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 0.1rem; /* Minimal responsive margin */
    overflow: hidden;
    z-index: 1;
    position: relative;
    aspect-ratio: 4 / 1;
    max-height: auto;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    animation: slide 12s infinite;
}

.banner-image:nth-child(1) {
    animation-delay: 0s;
}

.banner-image:nth-child(2) {
    animation-delay: 4s;
}

.banner-image:nth-child(3) {
    animation-delay: 8s;
}

@keyframes slide {
    0% { opacity: 1; }
    25% { opacity: 1; }
    33.33% { opacity: 0; }
    91.66% { opacity: 0; }
    100% { opacity: 1; }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #ff0000;
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.cta-button:hover {
    background-color: #cc0000;
}

.products, .about, .contact {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.product-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0; /* Tabs touch each other */
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd; /* Bottom border for tab bar */
}

.product-selector input[type="radio"] {
    display: none;
}

.product-selector .product-button {
    background-color: #fff;
    border: 2px solid #ddd;
    border-bottom: none; /* Remove bottom border for tab effect */
    border-radius: 5px 5px 0 0; /* Rounded top corners */
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    width: 180px; /* Fixed width for uniform size */
    min-height: 40px; /* Uniform height */
    text-align: center;
    transition: border 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    position: relative;
    z-index: 1;
}

.product-selector input[type="radio"]:checked + .product-button {
    border: 2px solid #ff0000;
    border-bottom: 2px solid #fff; /* Overlap bottom border for active tab */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    background-color: #fff; /* White to blend with content */
    color: #ff0000; /* Red text for active tab */
    z-index: 2; /* Bring active tab above others */
}

.product-selector .product-button:hover {
    background-color: rgba(255, 0, 0, 0.05);
}

details {
  margin: 10px 0;
  border-radius: 5px; /* Consistent with site’s rounded corners */
  background-color: #fff; /* Match .content-section background */
}

summary {
  cursor: pointer;
  padding: 10px;
  background-color: #f5f5f5;  /* Match body background for consistency */
  border-radius: 3px; /* Slightly smaller radius for nested elements */
  color: #333; /* Match body text color */
  transition: background-color 0.3s ease, color 0.3s ease; /* Match site’s transition style */
}

summary:hover {
  background-color: rgba(255, 0, 0, 0.05); /* Subtle red tint to match .product-button:hover */
  color: #ff0000; /* Match link and active tab color */
}

.details-container {
    padding: 0 10px; /* Match content-section padding */
}

details details {
    margin-left: 20px; /* Indent nested details for hierarchy */
    border: 1px solid #eee; /* Lighter border for sub-level */
}

details p, details ul {
    margin: 10px 0;
    color: #333; /* Match body text */
}

details h4, details h5 {
    color: #ff0000; /* Match theme’s red for headings */
    margin: 10px 0 5px;
}

details ul li {
    margin-bottom: 5px;
}

.content-section {
    display: none;
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 1rem;
    text-align: left;
    grid-column: 1 / -1; /* Full width in grid layout */
    overflow: visible;
}

.content-section img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.content-section ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 1rem 0;
}

#rolling-shutter:checked ~ .content-section.rolling-shutter,
#garage-door:checked ~ .content-section.garage-door,
#auto-door:checked ~ .content-section.auto-door,
#door-repair:checked ~ .content-section.door-repair {
    display: block;
    opacity: 1;
    padding: 1.5rem;
}

#rolling-shutter:checked ~ .content-section:not(.rolling-shutter),
#garage-door:checked ~ .content-section:not(.garage-door),
#auto-door:checked ~ .content-section:not(.auto-door),
#door-repair:checked ~ .content-section:not(.door-repair) {
    display: none;
    opacity: 0;
    max-height: 0;
}

/* Added for opening the content of products below the list */
.product-nav { margin-bottom: 1rem; }
.product-list { list-style: none; display: flex; gap: 1rem; padding: 0; }
.product-item { cursor: pointer; padding: 0.5rem 1rem; background: #f5f5f5; border: 1px solid #ddd; }
.product-item.active, .product-item:hover { background: #ff0000; color: #fff; }
.product-content { border: 1px solid #ddd; padding: 1rem; }
.product-details { display: none; }
.product-details.active { display: block; }

.contact-info {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
}

.contact-info li {
    margin-bottom: 1rem;
}

.contact-info a {
    color: #ff0000;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}


footer {
    background-color: #3b3b3b;
    color: #fff;
    text-align: center;
    margin-top: 0;
}

footer a {
    color: #ff0000;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.whatsapp-button img {
    width: 50px;
    height: 50px;
}

.slider-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
    --slide-width: 150px; /* Desktop thumbnail width */
     --gap: 20px; /* Space between slides */
    --num-unique: 5; /* Number of unique slides (before duplicates) */
    --duration: 20s; /* Total animation duration */
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: calc((200px - 150px) / 2); /* Center vertically in 200px container */;
    width: var(--slide-width);
    height: 150px;
    left: 100%;
    animation: autoRun var(--duration) linear infinite;
    animation-delay: calc((var(--duration) / var(--num-unique)) * (var(--position) - 1) - var(--duration));
    margin-left: 5px;
    transition: transform 0.3s ease;
    line-height: 0;
}

.slide img, .slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    display: block;
    position: relative;
    top: 0;
    left: 0;
    padding: 0;
    border: 0;
    margin: 0;
}

.slide:hover {
    transform: scale(1.5);
    z-index: 10;
}

.slider-container:hover .slide {
    animation-play-state: paused;
} 

@keyframes autoRun {
    from { left: 100%; }
    to { left: calc(-1 * (var(--slide-width) + 5px)); } /* 150px + 5px = 155px */
}

/* Fixed Slider Container */
.fixed-slider-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    margin: 1rem auto;
    width: 100%;
    max-width: 1200px;
    --slide-width: 150px;
    --num-unique: 5; /* Legacy, not used */
    --duration: 20s; /* Legacy, not used */
}

/* Fixed Slider Track */
.fixed-slider-track {
    display: flex;
    justify-content: center; /* Centers all slides horizontally */
    align-items: center;     /* Centers slides vertically */
    height: 100%;
    gap: 5px;                /* Space between slides */
    width: 100%;
}

/* Individual Fixed Slides */
.fixed-slide {
    flex: 0 0 var(--slide-width); /* Fixed width, no grow/shrink */
    height: 150px;
    line-height: 0;
    transition: transform 0.3s ease;
}

/* Images/Videos in Fixed Slides */
.fixed-slide img,
.fixed-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    display: block;
    position: relative;
    top: 0;
    left: 0;
    padding: 0;
    border: 0;
    margin: 0;
}

/* Hover Effect (Unchanged) */
.fixed-slide:hover {
    transform: scale(1.5);
    z-index: 10;
}

/* Mobile Adjustments (≤768px) */
@media (max-width: 768px) {
    .fixed-slider-container {
        height: 150px;
        --slide-width: 75px;
        --duration: 12s; /* Legacy */
    }

    .fixed-slider-track {
        gap: 15px; /* Larger gap on mobile */
    }

    .fixed-slide {
        height: 100px;
    }
}

/* Smaller Screens (≤480px) - Matches Original */
@media (max-width: 480px) {
    .fixed-slider-container {
        max-height: calc(20vh);
    }
}

@media (max-width: 992px) {
    .banner {
        aspect-ratio: 3 / 1;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .slider-container {
        height: 150px;
        --slide-width: 75px; /* Mobile thumbnail width */
        --num-unique: 5; /* Number of unique slides (before duplicates) */
        --duration: 12s; /* Total animation duration */
    }

    .slide {
        top: calc((150px - 100px) / 2); /* Center vertically in 150px container */;
        width: var(--slide-width);
        height: 100px;
        margin-left: 15px;
        line-height: 0;
    }

    .slide img, .slide video {
        object-fit: contain;
        padding: 0;
        border: 0;
        margin: 0;
    }
    
    @keyframes autoRun {
        from { left: 100%; }
        to { left: calc(-1 * (var(--slide-width) + 15px)); } /* 100px + 5px = 115px */
    }

    .logo {
        order: 1;
    }
    
    .social-icons {
        order: 2; /* Places social icons between logo and menu */
        margin: 0.5rem 0;
    }

    nav ul {
        order: 3;
    }

    .hero {
        padding: calc(1vh + 0.25rem) calc(0.5vw + 0.25rem); /* Tighter padding for mobile */
    }

    .banner {
        margin: 0 auto 0.1rem; /* Tighter margin for mobile */
        max-height: calc(25vh); /* Cap banner height at 25% of viewport height (~162.5px at 650px) */
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .banner {
        aspect-ratio: 2 / 1;
    }

    .content-section {
        padding: 1rem; /* Reduce padding for mobile */
    }
    
    details {
        margin: 5px 0;
        padding: 5px;
    }
    summary {
        padding: 8px;
        font-size: 0.9rem; /* Match .hero p */
    }
    details details {
        margin-left: 10px; /* Reduce indent for mobile */
    }
}

@media (max-width: 480px) {
    .hero {
        padding: calc(0.75vh + 0.25rem) calc(0.25vw + 0.25rem); /* Minimal padding for small screens */
    }

    .banner {
        margin: 0 auto 0.1rem; /* Minimal margin for small screens */
        max-height: calc(20vh); /* Cap banner height at 20% of viewport height (~130px at 650px) */
    }

    .banner {
        aspect-ratio: 1.5 / 1;
    }
}
