/* === Variable Definitions === */
:root {
  /* Original Light Theme Palette */
  --light-bg-primary: #e1e9fa; /* Near white, soft background */
  --light-bg-secondary: #ffffff; /* Pure white for cards/elements */
  --light-text-primary: #063961; /* Black color for text in light theme */
  --light-text-secondary: #1a1a1a; /* From original --gris-medio */
  --light-accent-blue: #063961; /* From original --azul-marino */
  --light-accent-green: #02a30a; /* From original --verde */
  --light-heading-color: #063961; /* Black heading color */
  --light-border-color: #2c7e13; /* From original --gris-claro */
  --light-shadow-color: rgba(0, 0, 0, 0.1); /* Soft shadow, good default */

  /* EPAM-inspired Dark Theme Palette */
  --dark-bg-primary: #0f2e3b; /* Deep charcoal */
  --dark-bg-secondary: #425763; /* Slightly lighter charcoal for elements */
  --dark-text-primary: #f0f0f0; /* Off-white for main text */
  --dark-text-secondary: #a0a0a0; /* Light grey for secondary text */
  --dark-accent-blue: #00aaff; /* Brighter blue for dark mode */
  --dark-accent-green: #02a30a; /* Brighter green for dark mode */
  --dark-heading-color: #f9f9f9; /* Light heading color */
  --dark-border-color: #00aaff; /* Darker grey borders */
  --dark-shadow-color: rgba(0, 0, 0, 0.4); /* More pronounced shadow */

  /* General Variables (mapped to current theme) */
  --bg-primary: var(--light-bg-primary);
  --bg-secondary: var(--light-bg-secondary);
  --text-primary: var(--light-text-primary);
  --text-secondary: var(--light-text-secondary);
  --accent-color: var(--light-accent-green);
  --heading-color: var(--light-heading-color);
  --button-bg: var(--light-accent-blue);
  --button-hover-bg: var(--light-accent-green);
  --button-text: #ffffff; /* White text on buttons */
  --card-bg: var(--light-bg-secondary);
  --card-shadow: 0 4px 15px var(--light-shadow-color);
  --link-color: var(--light-accent-blue);
  --link-hover-color: var(--light-accent-green);
  --icon-color: var(--light-accent-blue);
  --border-color: var(--light-border-color);

  /* Gradients */
  --gradient-primary: linear-gradient(to right, var(--light-accent-blue),var(--accent-color));
  --gradient-secondary: linear-gradient(to right, var(--light-accent-green), var(--accent-color));

  /* Layout */
  --header-height: 88px;
  --above-header-height: 60px; /* Adjusted for a cleaner look */
  --footer-bg: var(--light-accent-blue); /* Light theme footer background: azul-marino */
  --footer-text: #ffffff; /* Light theme footer text: White */

  /* GM INGTEC Logo Colors (for highlighting) */
  --gm-logo-highlight-blue: #007bff; /* A blue that matches the logo */
  --gm-logo-highlight-green: #02a30a; /* A green that matches the logo */

  /* RGB values for dynamic transparencies */
  --light-accent-blue-rgb: 6, 57, 97;
  --light-accent-green-rgb: 2, 163, 10;
  --dark-accent-blue-rgb: 0, 170, 255;
  --dark-accent-green-rgb: 0, 230, 118;
}

[data-theme="dark"] {
  --bg-primary: var(--dark-bg-primary);
  --bg-secondary: var(--dark-bg-secondary);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --accent-color: var(--dark-accent-blue);
  --heading-color: var(--dark-heading-color);
  --button-bg: var(--dark-accent-blue);
  --button-hover-bg: var(--dark-accent-green);
  --button-text: #ffffff;
  --card-bg: var(--dark-bg-secondary);
  --card-shadow: 0 6px 20px var(--dark-shadow-color);
  --link-color: var(--dark-accent-blue);
  --link-hover-color: var(--dark-accent-green);
  --icon-color: var(--dark-accent-blue);
  --border-color: var(--dark-border-color);

  --gradient-primary: linear-gradient(to right, var(--dark-accent-blue), var(--dark-accent-green));
  --gradient-secondary: linear-gradient(to right, var(--dark-accent-green), var(--dark-accent-blue));

  --footer-bg: #1a1a1a; /* Dark theme footer background */
  --footer-text: var(--dark-text-secondary); /* Dark theme footer text */
}

/* Dynamic Backgrounds with Image Textures and Transparencies */
.dynamic-bg {
    position: relative;
    overflow: hidden; /* Ensure textures don't spill out */
}

.dynamic-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; /* Cover the entire section */
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease, filter 0.3s ease; /* Smooth transition for texture changes and filter */
}

/* Hero Section - Light Theme */
#hero-section.dynamic-bg::before {
    background-image: url('../images/light.jpg'); /* Light theme hero image */
    opacity: 0.2; /* Adjust for transparency */
}
/* Hero Section - Dark Theme */
[data-theme="dark"] #hero-section.dynamic-bg::before {
    background-image: url('../images/dark.webp'); /* Dark theme hero image */
    opacity: 0.3; /* Adjust for transparency */
}

/* GM Ingenieria Section - Light Theme */
#gm-ingenieria.dynamic-bg::before {
    background-image: url('../images/bg_wave_dots.jpeg'); /* Wave dots texture */
    background-size: 100px; /* Adjust size for pattern repetition */
    opacity: 0.1;
    filter: none; /* No filter for light theme */
}
/* GM Ingenieria Section - Dark Theme */
[data-theme="dark"] #gm-ingenieria.dynamic-bg::before {
    background-image: url('../images/bg_wave_dots.jpeg'); /* Same texture, adjust opacity/blend */
    opacity: 0.15;
    filter: invert(1) hue-rotate(180deg); /* Invert and hue-rotate for dark theme */
}

/* GM Tecnologia Section - Light Theme */
#gm-tecnologia.dynamic-bg::before {
    background-image: url('../images/water-texture-light.png'); /* Water texture */
    background-size: 200px;
    opacity: 0.08;
    filter: none;
}
/* GM Tecnologia Section - Dark Theme */
[data-theme="dark"] #gm-tecnologia.dynamic-bg::before {
    background-image: url('../images/water-texture-dark.png'); /* Dark water texture */
    opacity: 0.12;
    filter: none;
}

/* Nosotros Section - Light Theme */
#nosotros.dynamic-bg::before {
    background-image: url('../images/bg_wave_dots.jpeg'); /* Another texture */
    background-size: 150px;
    opacity: 0.07;
    filter: none;
}
/* Nosotros Section - Dark Theme */
[data-theme="dark"] #nosotros.dynamic-bg::before {
    background-image: url('../images/bg_wave_dots.jpeg'); /* Same texture, adjust opacity/blend */
    opacity: 0.1;
    filter: invert(1) hue-rotate(180deg); /* Invert and hue-rotate for dark theme */
}

/* Contacto Section - Light Theme */
#contacto.dynamic-bg::before {
    background-image: url('../images/water-texture-light.png'); /* Water texture */
    background-size: 180px;
    opacity: 0.09;
    filter: none;
}
/* Contacto Section - Dark Theme */
[data-theme="dark"] #contacto.dynamic-bg::before {
    background-image: url('../images/water-texture-dark.png'); /* Dark water texture */
    opacity: 0.14;
    filter: none;
}


.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 15px;
}

/* === Base & Typography === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  color: var(--heading-color);
  margin-bottom: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.8rem; text-align: center; margin-bottom: 0.5rem;}
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; padding-top: 2rem;}
h3 { font-size: 1.6rem; margin-bottom: 1.5rem; margin-top: 2rem;}
h4 { font-size: 1.3rem; color: var(--accent-color); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
  padding: 0;
}

.logos-carousel-wrapper {
    background-color: var(--dark-bg-primary); /* Use dark background for logos */
    padding: 20px 0;
}

.partner-logos img {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* === Loading Transition === */
.loading-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, var(--light-bg-primary), var(--light-accent-blue)); /* Light theme gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
[data-theme="dark"] .loading-transition {
    background: linear-gradient(to bottom right, var(--dark-bg-primary), var(--dark-accent-blue)); /* Dark theme gradient */
}

.loading-transition.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--light-text-primary);
}
[data-theme="dark"] .loading-content {
    color: var(--dark-text-primary);
}

.loading-robot {
    width: auto;
    height: 350px;
    animation: bounce 3s infinite ease-in-out;
}

.loading-content h2 {
    margin-top: 1rem;
    color: inherit; /* Inherit color from parent */
}
.loading-content p {
     color: inherit; /* Inherit color from parent */
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* === Above Header === */
#above-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--footer-bg); /* Always dark for above header */
    color: var(--dark-text-primary);
    padding: 0.3rem 0;
    line-height: var(--above-header-height);
    height: var(--above-header-height);
    overflow: hidden;
    font-size: 1rem; /* Slightly smaller font size */
    z-index: 1001;
}

#above-header .av-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
#above-header .av-columns-area {
    display: flex;
    width: 100%;
    height: 100%;
}
#above-header .av-column-5,
#above-header .av-column-7 {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
}
#above-header .av-column-5 {
    flex-basis: 40%;
    justify-content: flex-start;
}
#above-header .av-column-7 {
    flex-basis: 60%;
    display: flex;
    justify-content: flex-end;
}

#above-header .widget-left,
#above-header .widget-right {
    display: flex;
    align-items: center;
    height: 100%;
}
#above-header .widget-left {
    justify-content: flex-start;
    gap: 1.5rem;
}

#above-header .widget_social_widget {
    height: 100%;
    display: flex;
    align-items: center;
}
#above-header .widget_social_widget ul {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

#above-header .widget_social_widget a i {
    font-size: 1.5rem; /* Slightly smaller icon size */
    color: var(--button-text);
    transition: color 0.3s ease;
}
#above-header .widget_social_widget a:hover i {
    color: var(--dark-text-secondary);
}

#above-header .widget-right {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

#above-header .widget-contact {
    height: 100%;
    display: flex;
    align-items: center;
}

#above-header .widget-contact .contact-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#above-header .widget-contact .contact-icon i {
    font-size: 1rem; /* Slightly smaller icon */
    color: var(--dark-accent-blue);
}
#above-header .widget-contact .contact-info {
    color: var(--dark-text-secondary);
    font-size: 0.9rem;
}
#above-header .widget-contact .contact-info:hover {
    color: var(--dark-accent-blue);
}
#above-header .widget-contact .title {
    display: inline-block;
    vertical-align: middle;
}


/* === Header === */
.site-header {
  position: fixed;
  top: var(--above-header-height);
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-secondary); /* Use secondary background for header */
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px var(--card-shadow);
  z-index: 1000;
  transition: background-color 0.3s ease, top 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    top: 0;
    z-index: 1002;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  height: calc(var(--header-height) * 0.7);
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Subtle highlighting for the logo */
  box-shadow: 0 0 8px rgba(var(--gm-logo-highlight-blue-rgb), 0.4), 
              0 0 15px rgba(var(--gm-logo-highlight-green-rgb), 0.3);
  transition: all 0.3s ease-in-out;
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(var(--gm-logo-highlight-blue-rgb), 0.6), 
              0 0 25px rgba(var(--gm-logo-highlight-green-rgb), 0.5);
}


.main-nav ul {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 400;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Tabs */
.tabs {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tabs li {
    margin-right: 2px;
    flex-grow: 1;
}

.tabs li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px 5px 0 0;
}
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-bg-primary); /* Dark background for cookie banner */
    color: var(--dark-text-primary);
    padding: 15px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    flex-wrap: wrap;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.cookie-consent h5 {
    margin: 0;
    padding-right: 10px;
    color: inherit;
    font-size: 1rem; /* Adjusted font size */
}

.cookie-consent a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-consent button {
    background-color: var(--accent-color);
    color: var(--button-text);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px; /* Space between buttons */
}

.cookie-consent button:hover {
    background-color: var(--link-hover-color);
}

.tabs li.active a {
    color: var(--button-text);
    background-color: var(--button-bg);
    border-bottom: none;
}

.tabs li a:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-text);
}

.tab-content {
    margin-top: 20px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 0 0 5px 5px;
    background-color: var(--bg-primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  right: 50px;
}

.theme-toggle:hover {
  color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
}


/* === Sections === */
.section {
  padding: 2rem 0;
   position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.alt-bg {
  background-color: var(--bg-secondary);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.section-intro h2 {
    margin-bottom: 0.5rem;
}

.section-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Hero Section (Now Slider) */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    padding-top: calc(var(--above-header-height) + var(--header-height));
    margin-top: calc((var(--above-header-height) + var(--header-height)) * -1);
}

main .section {
     padding-top: 2rem;
}

.swiper-container {
    width: 100%;
    height: 100%;
}
.swiper-slide {
    position: relative;
}
.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.theme-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
}
.theme-content {
    max-width: 90%;
    width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    color: #ffffff; /* Always white text on hero images */
}
.theme-content.text-left {
    text-align: left;
}
.theme-content.text-right {
    text-align: right;
}
.theme-content h1 {
     color: #ffffff;
     font-size: 3.5rem;
     margin-bottom: 1rem;
     text-align: inherit;
}
.theme-content .subtitle {
    font-size: 1.5rem;
    color: var(--light-accent-green); /* Use a consistent accent for subtitle */
    margin-bottom: 1.5rem;
    font-weight: 300;
     text-align: inherit;
}
.theme-content h2 {
    font-size: 1.3rem;
    color: #ffffff;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 2rem auto;
     text-align: inherit;
}

/* Swiper Navigation & Pagination */
.swiper-button-next, .swiper-button-prev {
    color: #ffffff; /* White arrows for contrast on images */
}
.swiper-pagination-bullet {
    background-color: rgba(255,255,255,0.7); /* Light dots */
    opacity: 0.8;
}
.swiper-pagination-bullet-active {
    background-color: var(--accent-color); /* Accent color for active dot */
    opacity: 1;
}


/* Service Grid / Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--accent-color);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--light-shadow-color);
}
[data-theme="dark"] .service-card:hover {
     box-shadow: 0 10px 30px var(--dark-shadow-color);
}

.service-card .icon-large {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 0.8rem;
}
.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1rem;
}
.service-card ul {
    margin-top: 1rem;
    padding-left: 0;
}
.service-card ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.service-card ul li i {
    color: var(--accent-color);
    font-size: 1rem;
}


/* Nosotros Section */
.about-content {
    max-width: 800px;
    margin: 2rem auto 0 auto;
    text-align: center;
}
.partner-logos {
    margin-top: 2rem;
}

/* Contacto Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 1.5rem;
}

.contact-info h3, .contact-form h3 {
    text-align: left;
    margin-bottom: 1.5rem;
}
.input-error {
    border: 1px solid red;
}

.form-error {
    color: red;
    font-size: 0.85em;
    margin-top: 5px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 0.2rem;
}

.info-item p {
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
}
.info-item strong {
    color: var(--text-primary);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form select,
[data-theme="dark"] .contact-form textarea {
    background-color: var(--dark-bg-secondary);
    border-color: var(--dark-border-color);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3); /* Using a fixed blue for focus shadow */
}

.contact-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.contact-form .form-check label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.9rem;
}
.contact-form .form-check input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent-color);
}
.contact-form .inline-link {
    text-decoration: underline;
}

.btn-submit {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-submit:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

/* === Buttons === */
.av-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.av-btn i {
    margin-left: 0.5rem;
}

/* Primary Button */
.av-btn-primary {
    background-color: var(--button-bg);
    color: var(--button-text);
}
.av-btn-primary:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

/* Secondary Button */
.av-btn-secondary {
    background-color: transparent; /* Transparent background */
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.av-btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--button-text);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Small Button */
.av-btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Gradient Button */
.av-btn-gradient {
    background: var(--gradient-primary);
    color: var(--button-text);
    background-size: 200% auto;
    transition: background-position 0.5s ease, transform 0.2s ease, color 0.3s ease;
}
.av-btn-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
}

/* Bubble Effect Button */
.av-btn-bubble {
    background-color: var(--button-bg);
    color: var(--button-text);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}

.av-btn-bubble:hover {
    color: var(--button-text);
}

.av-btn-bubble .bubble_effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.av-btn-bubble .circle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
    transform: scale(0);
    animation: bubble-in 0.5s ease-out forwards;
}

@keyframes bubble-in {
    to {
        transform: scale(10);
        opacity: 0;
    }
}

/* Policy Section */
.policy-section {
    padding-top: calc(var(--header-height) + var(--above-header-height) + 2rem);
    padding-bottom: 4rem;
}
.policy-article {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}
.policy-article h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.policy-article h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}
.policy-article ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.policy-article li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
/* Policy Page Specific Styles */
.policy-page-main {
    padding-top: 0;
}

.policy-page-container {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}
/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2e2e2e;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  font-size: 15px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease, bottom 0.4s ease;
}

.toast.show {
  opacity: 1;
  bottom: 50px;
}

/* === Footer === */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 1rem 0 0 0;
  margin-top: 1rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-column h4 {
  color: #ffffff; /* White titles in footer */
  margin-bottom: 1rem;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

.footer-column ul li {
  margin-bottom: 0.6rem;
}

.footer-column a {
  color: var(--footer-text);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-column a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}
.footer-column p {
    font-size: 0.9rem;
    color: var(--footer-text);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.footer-column p i {
    margin-top: 0.2em;
    color: var(--accent-color);
}
.footer-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}
.footer-tagline {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--dark-text-secondary); /* Use dark text secondary for tagline */
}

.footer-social a i {
    color: var(--footer-text);
    font-size: 1.8rem;
}
.footer-social a:hover i {
    color: var(--accent-color);
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--dark-text-secondary);
}


/* === Floating Buttons === */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-color: var(--accent-color);
  color: var(--button-text);
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.9; /* Slightly more opaque */
}

.back-to-top:hover {
  opacity: 1;
  transform: scale(1.1);
  color: var(--button-text);
}

.floating-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
}

.contact-main-button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-main-button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

.contact-options {
    display: none; /* Controlled by JS class 'active' */
    position: absolute;
    bottom: 0;
    right: 150px;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 0.8rem;
    box-shadow: 0 5px 15px var(--card-shadow);
    display: flex; /* Default display when active */
    gap: 1rem;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden; /* Hide from screen readers when not active */
}

.floating-contact.active .contact-options {
    display: flex; /* Ensure it's flex when active */
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.contact-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #ffffff; /* White icons on colored circles */
    transition: transform 0.2s ease, background-color 0.3s ease;
}
.contact-option:hover {
    transform: scale(1.15);
}

.contact-option.whatsapp {
    background-color: #25D366;
}
.contact-option.whatsapp:hover {
    background-color: #1DAE52;
}

.contact-option.form {
    background-color: var(--accent-color); /* Use accent color for form/calendar */
}
.contact-option.form:hover {
     background-color: var(--button-hover-bg);
}

/* Modals */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.6); /* Darker overlay for better focus */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex !important; /* Use !important to ensure it overrides any other display property */
    opacity: 1;
}

.modal-content {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px; /* Max width for iframe modal */
  position: relative;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-overlay.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-content.small { /* For custom modals like WhatsApp/Letan */
    max-width: 400px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem; /* Larger close button */
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.close-btn:hover {
    color: var(--accent-color);
}

.modal-iframe {
    width: 100%;
    height: 500px; /* Fixed height for iframe */
    border: none;
    border-radius: 4px;
}

.modal-content h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
}
.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.modal-content img {
    max-width: 60%; /* Adjust image size in modal */
    height: auto;
    border-radius: 8px;
    margin: 1rem auto;
    display: block;
}
.modal-content button {
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.modal-content button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}


/* === Responsive Design === */
@media (max-width: 900px) {
    .header-container {
        padding: 0 1rem;
    }
    .main-nav {
        display: none;
    }
     .contact-container {
        grid-template-columns: 1fr;
    }
    #above-header .av-columns-area {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        height: auto;
    }
    #above-header .av-column-5,
    #above-header .av-column-7 {
        flex-basis: auto;
        width: 100%;
        height: auto;
    }
    #above-header .widget-left,
    #above-header .widget-right {
        justify-content: center;
        text-align: center;
        gap: 0.8rem;
        height: auto;
    }
     #above-header .av-column-7 {
         justify-content: center;
     }
      #above-header .widget_social_widget {
           height: auto;
           margin-bottom: 0.5rem;
      }
       #above-header .widget-contact {
            height: auto;
            justify-content: center;
       }
     .av-btn-store .button-text {
        display: none;
    }
    .av-btn-store {
         padding-left: 0.8rem;
         padding-right: 0.8rem;
    }
    .av-btn-contact .button-text {
        display: none;
    }
}

@media (max-width: 750px) {
     html {
        font-size: 15px;
     }
     h1 { font-size: 2.5rem; }
     h2 { font-size: 1.8rem; }
     h3 { font-size: 1.4rem; }

    #above-header {
        display: none; /* Hide above-header on mobile */
    }
    
    .site-header {
        top: 0 !important;
    }
    
   .main-nav {
        display: none;
        position: absolute; /* Use fixed for mobile menu */
        top: var(--header-height);
        width: 40%; /* Wider mobile menu */
        max-width: 300px; /* Max width for mobile menu */
        background-color: var(--bg-secondary);
        right: 0;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 8px var(--card-shadow);
        height: calc(100vh - var(--header-height)); /* Full height minus header */
        overflow-y: auto; /* Scrollable if content is long */
        transition: transform 0.3s ease-out;
        transform: translateX(100%); /* Start off-screen */
    }
     .main-nav.active {
        display: flex;
        transform: translateX(0); /* Slide in */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .main-nav li {
        width: 100%;
        text-align: center;
    }
     .main-nav a {
        padding: 1rem 0;
        display: block;
         width: 100%;
    }
     .main-nav a::after {
        display: none;
    }
     .main-nav a:hover,
    .main-nav a.active {
        background-color: rgba(var(--accent-color-rgb, 0, 123, 255), 0.1); /* Light background on hover/active */
    }

    .menu-toggle {
        display: block;
        position: absolute; /* Position relative to header */
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .footer-container {
         grid-template-columns: 1fr;
         text-align: center;
    }
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
     .footer-column p {
        justify-content: center;
    }
    .footer-social {
        justify-content: center;
    }
    .theme-content h1 {
        font-size: 2.2rem;
    }
     .theme-content .subtitle {
        font-size: 1.2rem;
     }
     .theme-content h2 {
        font-size: 1rem;
     }
     
     .slider-wrapper {
          padding-top: var(--header-height);
          margin-top: calc(var(--header-height) * -1);
     }
      main .section {
           padding-top: 3rem;
      }
       .policy-section, .policy-page-main {
            padding-top: 0;
       }
    .floating-contact .contact-options {
        right: 70px; /* Adjust position for mobile */
    }
}

@media (max-width: 480px) {
     html {
        font-size: 14px;
     }
     h1 { font-size: 1.8rem; }
     h2 { font-size: 1.4rem; }
     h3 { font-size: 1.2rem; }
      .av-btn {
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
      }
      .theme-content h1 {
          font-size: 1.6rem;
      }
      .theme-content .subtitle {
          font-size: 0.9rem;
      }
       .theme-content h2 {
         font-size: 0.8rem;
       }
        .header-right {
            gap: 0.6rem;
        }
        .theme-toggle {
             font-size: 1.5rem;
             
          }
        .modal-content {
            padding: 15px;
        }
        .modal-iframe {
            height: 400px; /* Smaller iframe on small screens */
        }
}

/* Swiper Autoplay Scroll Animation */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scrolls half the width to loop */
}

.animate-scroll {
  animation: scroll var(--animation-duration, 40s) linear infinite;
}

.scroller img {
  max-height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.scroller img:hover {
  transform: scale(1.05);
}
