/* --- Page Loader Styles --- */
#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
    color: #fff;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #cc0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-content p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    margin: 0;
}

/* --- CSS Variables for Consistency --- */
:root {
    --primary-red: #cc0000; /* Ibinalik sa pula para sa consistency */
    --dark-gray: #333;
    --light-gray: #f4f4f4;
    --text-gray: #555;
    --text-color-light: #fff; 
    --font-family: 'Poppins', sans-serif;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; /* Adds smooth scrolling for anchor links */
}

body.home-page {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #fff; /* Tiyaking puti ang background para sa home page */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styling */
.navbar {
    /* Pinalitan ang solid color ng isang banayad na pattern */
    background-color: #2c2c2c;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Crect width='8' height='8' fill='%232c2c2c'/%3E%3Cpath d='M0 0L8 8ZM8 0L0 8Z' stroke-width='0.5' stroke='%23444'/%3E%3C/svg%3E");
    padding: 10px 0;
    color: var(--text-color-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border-top: 4px solid var(--primary-red); /* Nagdagdag ng pulang border sa itaas */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 30px; /* Adjust as needed */
    width: auto;
}

.nav-links ul {
    display: flex;
    gap: 30px; /* Space between links */
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 30px;
    height: 24px;
    z-index: 1002; /* Ensure it's above other elements */
    transition: all 0.3s ease;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color-light);
    margin: 0 auto;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.mobile-only {
    display: none;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Desktop Navigation - Ensure proper display */
@media (min-width: 993px) {
    .mobile-menu-toggle {
        display: none !important; /* Hide hamburger on desktop */
    }
    
    .mobile-only {
        display: none !important; /* Hide mobile-only elements */
    }
    
    .btn-small {
        display: inline-block !important; /* Show small contact button on desktop */
    }
    
    #mainNavigation {
        display: block !important; /* Show navigation on desktop */
        position: static !important;
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .nav-links ul {
        flex-direction: row !important;
        gap: 30px !important;
        text-align: left !important;
    }
    
    .nav-links a {
        padding: 0 !important;
        border-bottom: none !important;
        color: var(--text-color-light) !important;
    }
    
    .nav-links a:hover {
        color: var(--primary-red) !important;
    }
}

.nav-links a {
    font-weight: 400;
    font-size: 1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-red);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: var(--font-family);
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-contact {
    background-color: var(--primary-red);
    color: var(--text-color-light);
    border: 1px solid var(--primary-red);
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
}

.btn-contact:hover {
    background-color: #a00;
    border-color: #a00;
}

/* Hero Section Styling */
.hero-section {
    position: relative;
    height: 70vh; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    overflow: hidden; /* Hide video overflow */
}

.hero-video-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 100%;
    height: 100%;
    z-index: -1; /* Place behind overlay but above background */
}

.hero-video-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) scale(0.9);
    width: 100%;
    height: 100%;
    z-index: -1; /* Place behind overlay but above background */
    border: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay for better text readability over video */
    z-index: 0; /* Ensure overlay is above the video */
}

.hero-content {
    position: relative; /* Bring content above overlay */
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #f0f0f0;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    letter-spacing: 0.2px;
}

.highlight-text {
    color: #ff4d4d;
    font-weight: 900;
    animation: highlightPulse 2s ease-in-out infinite;
    letter-spacing: 0.5px;
}

@keyframes highlightPulse {
    0%, 100% { 
        color: #ff4d4d;
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 1),
                     0 0 30px rgba(255, 77, 77, 0.8);
    }
    50% { 
        color: #ff6b6b;
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 1),
                     0 0 40px rgba(255, 77, 77, 0.9);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #E53935, #C52328); /* Red gradient button */
    color: var(--text-color-light);
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(204, 0, 0, 0.4);
}

/* --- New Text Reveal Animation on Scroll --- */
.text-reveal-mask {
    display: block; /* Use block to ensure it takes full width for centering */
    overflow: hidden;
    line-height: 1.2; /* Adjust line-height to prevent clipping */
}

.animate-text-reveal {
    display: inline-block; /* Allows transform to work correctly */
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Delay for the second line of the h1 */
.hero-content h1 .text-reveal-mask:nth-child(2) .animate-text-reveal {
    transition-delay: 0.1s;
}

/* Delay for the paragraph */
.hero-content p .animate-text-reveal {
    transition-delay: 0.2s;
}

/* Triggered by home.js when the element is visible */
.fade-in-on-scroll.is-visible .animate-text-reveal {
    transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    /* Global Mobile Fixes */
    * {
        box-sizing: border-box;
    }
    
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        touch-action: manipulation;
    }
    
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        min-height: 100vh;
        position: relative;
    }
    
    .container {
        padding: 0 20px; /* Consistent padding */
        width: 100%;
        max-width: var(--max-width) !important; /* Use original max-width */
        margin: 0 auto !important; /* Ensure container stays centered */
    }
    
    /* Specific fix for hero section container */
    .hero-section .container {
        max-width: var(--max-width) !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
    
    /* Navbar Mobile Styles */
    .navbar {
        position: relative;
        z-index: 1001; /* Ensure navbar stays above content */
    }
    
    .navbar .container {
        flex-direction: row !important;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        height: 70px;
        padding: 0 20px;
    }

    .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        z-index: 1000;
    }

    .navbar-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex !important;
        order: -1;
        margin: 0;
        background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
        border: 1px solid rgba(255,255,255,0.05);
        cursor: pointer;
        padding: 0;
        z-index: 1010; /* Increased to stay above the menu */
        position: relative;
        width: 48px;
        height: 48px;
        border-radius: 14px;
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-menu-toggle:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
    }

    .mobile-menu-toggle .hamburger-line {
        height: 3px;
        background: var(--primary-red) !important;
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: 3px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-menu-toggle .hamburger-line:nth-child(1) { top: 14px; width: 24px; }
    .mobile-menu-toggle .hamburger-line:nth-child(2) { top: 22.5px; width: 18px; }
    .mobile-menu-toggle .hamburger-line:nth-child(3) { bottom: 14px; width: 24px; }

    /* Active state animation for X */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: translateX(-50%) translateY(8.5px) rotate(45deg); }
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; transform: translateX(50%); }
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) { width: 24px; transform: translateX(-50%) translateY(-8.5px) rotate(-45deg); }

    /* Reset original hamburger animation */
    .mobile-menu-toggle.active .hamburger-line {
        margin-top: 0;
        margin-bottom: 0;
    }

    .nav-actions {
        display: none;
    }

    .btn-small {
        display: none; /* Hide small button on mobile, show in menu instead */
    }
    
    .navbar .container > .btn-contact:not(.mobile-only) {
        display: none !important;
    }

    #mainNavigation {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        background-color: #1a1a1a;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.12);
        padding: 100px 25px 40px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1005; /* Increased to be higher than logo (1000) */
        overflow-y: auto;
        transform: translateX(-100%);
    }

    #mainNavigation.active {
        transform: translateX(0);
    }

    .nav-links ul {
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        padding: 0;
    }

    #mainNavigation li {
        width: 100%;
        margin: 5px 0;
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    #mainNavigation.active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Staggered animation for menu items */
    #mainNavigation.active li:nth-child(1) { transition-delay: 0.1s; }
    #mainNavigation.active li:nth-child(2) { transition-delay: 0.15s; }
    #mainNavigation.active li:nth-child(3) { transition-delay: 0.2s; }
    #mainNavigation.active li:nth-child(4) { transition-delay: 0.25s; }
    #mainNavigation.active li:nth-child(5) { transition-delay: 0.3s; }

    #mainNavigation a {
        display: block;
        width: 100%;
        padding: 12px 15px;
        color: #f0f0f0;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.2s ease;
        border-bottom: none;
    }

    .nav-links a {
        border-bottom: none !important;
    }

    #mainNavigation a:hover,
    #mainNavigation a:focus {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--primary-red);
        transform: translateX(5px);
    }

    #mainNavigation a.active {
        color: var(--primary-red);
        font-weight: 600;
    }

    .mobile-only {
        display: block; /* Show mobile-only contact button in the menu */
        width: 100%;
    }

    .mobile-only .btn-contact {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
        padding: 12px 20px;
        background: linear-gradient(45deg, var(--primary-red), #e60000);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .mobile-only .btn-contact:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(204, 0, 0, 0.3);
    }

    /* Hero Section Mobile */
    .hero-section {
        height: 100vh; /* Full viewport height */
        min-height: 600px; /* Minimum height for small screens */
        max-height: 100vh; /* Prevent overflow */
        overflow: hidden;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        position: relative;
    }

    .hero-video-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .hero-video-frame {
        width: 120%;
        height: 120%;
        transform: translateX(-50%) translateY(-50%) scale(0.8); /* Better scaling for mobile */
        min-width: 100vw;
        min-height: 100vh;
    }

    .hero-content {
        padding: 20px;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        max-width: 95% !important;
        position: relative;
        z-index: 2;
    }

    .hero-content h1 {
        font-size: 2em; /* Larger for better readability */
        line-height: 1.1;
        margin-bottom: 20px;
        text-align: center !important;
        font-weight: 900;
    }

    .hero-content p {
        font-size: 1em;
        margin-bottom: 25px;
        text-align: center !important;
        line-height: 1.5;
        max-width: 90%;
    }

    .hero-content .btn {
        display: block;
        margin: 0 auto !important;
        width: fit-content;
        padding: 15px 30px !important;
        font-size: 1em !important;
    }

    /* Also center the text reveal masks */
    .text-reveal-mask {
        display: block !important;
        text-align: center !important;
    }

    /* Expertise Section Mobile */
    .expertise-section {
        padding: 80px 0;
        overflow: visible;
        position: relative;
        min-height: 100vh;
    }

    .expertise-section .container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        position: relative;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    .expertise-section .button-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 50px !important;
        padding: 30px 20px !important;
        position: relative !important;
        z-index: 100 !important;
        order: 2; /* Ensure it comes after the grid */
        width: 100%;
        background: transparent;
    }

    .expertise-section .button-container .btn {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: var(--primary-red) !important;
        color: white !important;
        padding: 15px 30px !important;
        font-size: 1.1em !important;
        border-radius: 5px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
        min-width: 250px !important;
        box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3) !important;
    }

    .expertise-section .button-container .btn:hover {
        background: #ff0000 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4) !important;
    }

    .expertise-grid {
        flex-direction: column;
        height: auto;
        gap: 20px;
        padding: 0 10px;
        margin-bottom: 0; /* Remove bottom margin */
        overflow: visible;
        position: relative;
        z-index: 1;
        order: 1; /* Ensure it comes before the button */
    }

    .expertise-item, .expertise-item.active {
        flex: 1;
        min-height: 180px;
        max-height: 200px;
        overflow: hidden;
        border-radius: 8px;
    }

    .expertise-item .item-content, .expertise-item.active .item-content {
        transform: translateY(0);
        opacity: 1;
        padding: 15px;
    }

    .expertise-item .item-content h3 {
        transform: translateY(0);
        font-size: 1.2em;
        margin-bottom: 8px;
    }

    .home-page .expertise-item p.item-description, .expertise-item.active .home-page .expertise-item p.item-description {
        opacity: 1;
        font-size: 0.85em;
        line-height: 1.4;
    }

    .item-description {
        display: -webkit-box;
        display: box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Fallback for browsers that don't support line-clamp */
        max-height: 4.2em; /* Approximately 3 lines of text */
        line-height: 1.4;
    }

    /* Locations Section Mobile */
    .locations-section {
        padding: 80px 0;
        min-height: 100vh;
    }

    .locations-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .map-container {
        width: 100%;
        max-width: 100%;
        height: 250px;
        border-radius: 8px;
        overflow: hidden;
    }

    .map-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .location-list {
        width: 100%;
        text-align: left;
    }

    .region {
        margin-bottom: 20px;
    }

    .region h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .region ul {
        padding: 0;
        margin: 0;
    }

    .region li {
        font-size: 0.85em;
        margin-bottom: 5px;
        padding-left: 10px;
    }

    /* Button Container Mobile */
    .button-container {
        text-align: center;
        margin-top: 30px;
        padding: 20px 0;
    }

    .button-container .btn {
        display: inline-block !important;
        margin: 0 auto !important;
        padding: 12px 24px !important;
        font-size: 1em !important;
        min-width: 200px;
    }
    .btn-contact, .btn-primary {
        width: 100%;
        max-width: 280px;
        margin: 10px auto;
        padding: 12px 20px;
        font-size: 0.95em;
    }

    /* Section Titles Mobile */
    .section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .section-subtitle {
        font-size: 1em;
        margin-bottom: 40px;
    }

    /* Testimonial Section Mobile */
    .testimonial-section {
        padding: 60px 0;
    }

    .testimonial-content {
        padding: 30px 20px;
        padding-top: 3rem;
    }

    .testimonial-quote {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    /* Get Started Section Mobile */
    .get-started-section {
        padding: 60px 20px;
        background-attachment: scroll; /* Disable parallax on mobile */
    }

    .get-started-section .section-title {
        font-size: 1.8em;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 0 20px;
    }
    
    .main-footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links, .contact-item {
        justify-content: center;
    }

    .brand-info p {
        padding-right: 0;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }

    /* Fix for any horizontal scroll issues */
    img, iframe, video {
        max-width: 100%;
        height: auto;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
        width: 100%;
    }
    
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 0.95em;
        line-height: 1.4;
    }
    
    .expertise-item, .expertise-item.active {
        min-height: 150px;
        max-height: 180px;
    }
    
    .item-content {
        padding: 12px;
    }
    
    .item-content h3 {
        font-size: 1.1em;
    }
    
    .item-description {
        font-size: 0.8em;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: 2.8em; /* Approximately 2 lines of text */
    }
    
    .section-title {
        font-size: 1.6em;
    }
    
    .btn-contact, .btn-primary {
        font-size: 0.9em;
        padding: 12px 20px;
        width: 100%;
        max-width: 280px;
    }
    
    .region h3 {
        font-size: 1.1em;
    }
    
    .region li {
        font-size: 0.8em;
    }
    
    .testimonial-quote {
        font-size: 1rem;
    }
    
    .footer-bottom .container {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
}

/* Mobile Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .expertise-item:hover,
    .expertise-item:focus {
        transform: none;
    }
    
    .btn-contact:hover,
    .btn-primary:hover {
        transform: none;
        opacity: 1;
    }
    
    .nav-links a:hover {
        color: inherit;
        transform: none;
    }
    
    .nav-links a:active {
        color: var(--primary-red);
    }
}

/* Service Section Styling */
.service-section {
    padding: 60px 0;
    background-color: var(--light-gray); /* Light background to separate from hero */
}

.service-section .container {
    display: flex;
    justify-content: center; /* Center the card(s) */
    flex-wrap: wrap;
    gap: 30px; /* Space between cards if you add more */
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 40px 30px;
    text-align: center;
    max-width: 350px; /* Set a max-width for the card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px); /* Lift card on hover */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.icon-wrapper {
    margin-bottom: 20px;
}

.card-icon {
    font-size: 3em; /* Make the icon larger */
    color: var(--primary-red);
}

.card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.card-description {
    font-size: 1em;
    margin-bottom: 25px;
    color: #666; /* Slightly lighter text color */
}

.read-more-link {
    font-weight: 700;
    color: var(--primary-red);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    gap: 12px; /* Move arrow slightly on hover */
}

.arrow-icon {
    transition: transform 0.3s ease;
}

/* Scroll Animation Styling */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Expertise Section Styling */
.expertise-section {
    padding: 80px 0;
    background-color: #f8f9fa; /* Lighter gray background */
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px; /* Increased margin */
    color: var(--dark-gray);
    position: relative;
    z-index: 1;
}

.expertise-grid {
    display: flex;
    gap: 15px;
    height: 60vh; /* Set a height for the container */
    min-height: 500px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.expertise-item {
    flex: 1; /* Distribute space equally */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: flex 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-size: cover;
    background-position: center;
    display: flex; /* Use flexbox for content alignment */
    flex-direction: column;
    justify-content: flex-end;
}

.svg-icon-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    z-index: 1;
}

.expertise-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 0.3s ease;
}

.expertise-item:hover .expertise-bg {
    transform: scale(1.05);
}
 
.expertise-item.active {
    flex: 4; /* Expand the hovered item */
}

.expertise-item .item-content {
    padding: 30px;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    transform: translateY(100%); /* Itago ang content sa ibaba */
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.expertise-item.active .item-content {
    transform: translateY(0); /* Ipakita ang content kapag active */
    opacity: 1;
}

.item-content h3 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff; /* White text for readability against dark background */
    transform: translateY(20px); /* Bahagyang nakababa sa simula */
    transition: transform 0.5s ease 0.2s;
}

.expertise-item.active .item-content h3 {
    transform: translateY(0);
}

.home-page .expertise-item p.item-description {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    opacity: 0; /* Itago ang description sa simula */
    transition: opacity 0.5s ease 0.3s; /* Delayed transition */
}

.home-page .expertise-item.active p.item-description {
    opacity: 1; /* Ipakita ang description kapag active */
}

.button-container {
    text-align: center;
}

/* Responsive adjustments for Expertise Section - Tablet only */
@media (max-width: 992px) and (min-width: 769px) {
    /* On tablets, keep horizontal layout but adjust sizing */
    .expertise-item, .expertise-item.active { 
        flex: 1; 
        min-height: 250px; 
    }
}

/* Locations Section Styling */
.locations-section {
    padding: 100px 0;
    background-color: #2c3e50; /* Dark blue-gray background */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.locations-section .section-title {
    color: var(--text-color-light);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.locations-section .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.section-subtitle {
    font-size: 1.1em;
    color: var(--text-gray);
    max-width: 600px; /* Constrain width for readability */
    margin: -40px auto 60px auto; /* Pull up under title and add bottom margin */
}

.locations-content {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    justify-content: center;
    gap: 50px; /* Increased space between map and list */
    align-items: flex-start; /* Align top */
    text-align: left; /* Reset text alignment for children */
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.map-container {
    flex: 1 1 380px; /* Grow/shrink with a base of 380px */
    max-width: 420px;
    height: 580px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container */
    display: block;
}

.location-list {
    flex: 1 1 550px; /* Grow/shrink with a base of 550px */
    display: flex;
    flex-wrap: wrap;
    gap: 35px; /* Space between region columns */
    justify-content: space-between;
}

.region h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.region h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
}

.region ul {
    list-style: none;
    padding-left: 5px;
}

.region li {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.region li:hover {
    color: #fff;
    transform: translateX(5px);
}

/* Responsive Adjustments for Locations Section - Tablet only */
@media (max-width: 992px) and (min-width: 769px) {
    .locations-content {
        flex-direction: column; /* Stack map and list vertically */
        align-items: center;
    }

    .map-container {
        max-width: 450px; /* Control map width when stacked */
        height: 450px;
    }

    .location-list {
        max-width: 600px; /* Control list width when stacked */
    }
}

/* Get Started Section (Call-to-Action) */
.get-started-section {
    padding: 120px 20px;
    position: relative;
    background-image: url('https://images.pexels.com/photos/2219024/pexels-photo-2219024.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'); /* Construction background image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    text-align: center;
    color: var(--text-color-light);
    overflow: hidden;
}

.get-started-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Made the overlay lighter */
    z-index: 1;
}

.get-started-section .container {
    position: relative;
    z-index: 2; /* Ensure content is above the overlay */
}

.get-started-section .section-title {
    font-size: 3.2em;
    font-weight: 900;
    color: var(--text-color-light);
    margin-bottom: 20px;
    position: relative;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.7); /* Softer, more pronounced shadow */
}

.get-started-section .section-text {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.95); /* Made text slightly brighter for clarity */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.get-started-section .btn-primary {
    padding: 16px 45px;
    font-size: 1.2em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #E53935, #C52328); /* Red gradient button */
    color: #ffffff; /* White text */
    border: none;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.get-started-section .btn-primary:hover {
    background: #ffffff; /* White background on hover */
    color: #ffffff; /* White text on hover */
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: #C52328; /* Red text on hover */
}

/* Responsive Adjustments for Get Started Section */
@media (max-width: 768px) {
    .get-started-section {
        padding: 100px 20px;
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }
    
    .get-started-section .section-title {
        font-size: 2.2em;
    }
}

/* --- Testimonial Section --- */
.testimonial-section {
    padding: 120px 0;
    position: relative;
    background-image: url('https://images.pexels.com/photos/159306/construction-site-build-construction-work-159306.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Makes the background static with the scroll */
    overflow: hidden;
}

.testimonial-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-link:hover .testimonial-section {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.testimonial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;    
    background-color: rgba(0, 0, 0, 0.6); /* Made the overlay lighter */
    z-index: 1;
}

.testimonial-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-top: 4rem;
}

.testimonial-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem; /* Adjust size as needed */
    color: var(--primary-red); /* Use your site's primary color */
    opacity: 0.5;
}

.testimonial-quote {
    font-size: 1.5rem;
    font-family: Georgia, 'Times New Roman', Times, serif; /* Changed font for the quote */
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7); /* Added shadow for readability */
    font-style: italic;
}

.client-info {
    margin-top: 1.5rem;
}

.client-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.client-title {
    font-size: 1.05rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .testimonial-section {
        padding: 80px 0;
    }
    
    .testimonial-content {
        padding: 40px 20px;
        padding-top: 4rem;
    }
    
    .testimonial-quote {
        font-size: 1.3rem;
    }
}

/* Footer Styling */
.main-footer {
    background-color: #2c3e50; /* Dark blue/gray background */
    color: #e0e0e0; /* Light gray text */
    padding-top: 60px;
}

.main-footer a {
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--primary-red); /* Hover Effect: Change to accent red */
}

.main-footer h3 {
    color: var(--text-color-light);
    font-size: 1.25em;
    margin-bottom: 25px;
    position: relative;
}

.main-footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--primary-red);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; /* Customized columns width */
    gap: 40px;
    padding-bottom: 50px;
}

.logo-text {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--primary-red);
    margin-bottom: 15px;
    display: inline-block;
}

.brand-info p {
    font-size: 0.9em;
    margin-bottom: 20px;
    padding-right: 20px; /* Add some padding to prevent text from touching next column */
}

.quick-links li, .services-links li {
    margin-bottom: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.contact-item i {
    color: #ffffff; /* Changed to white for better visibility */
    margin-right: 15px;
    font-size: 1.1em;
    margin-top: 3px;
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.2em;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--text-color-light);
}

.footer-bottom {
    background-color: #243444; /* Slightly darker color */
    padding: 20px 0;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7); /* Ginawang mas maliwanag ang text para mabasa */
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9); /* Ginawang mas maliwanag ang mga link */
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-red); /* Mananatiling pula kapag na-hover */
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.policy-links a {
    margin-left: 15px;
}

/* Responsive Adjustments for Footer */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; /* Two columns on tablets */
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        text-align: center;
    }
    
    .main-footer h3::after {
        left: 50%;
        transform: translateX(-50%); /* Center the underline */
    }

    .social-links, .contact-item {
        justify-content: center;
    }

    .brand-info p {
        padding-right: 0;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 10px;
    }
}

/* Clients Section Styling */
.clients-section {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-title {
    margin-bottom: 15px;
}

.section-header .section-subtitle {
    font-size: 1.1em;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.clients-categories {
    margin-bottom: 60px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 12px 25px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: var(--text-gray);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-tab:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.category-tab.active {
    background-color: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.2);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.client-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.client-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.client-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.client-logo {
    background-color: #f8f9fa;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.client-logo img {
    max-width: 150px;
    max-height: 70px;
    object-fit: contain;
}

.client-info {
    padding: 25px;
}

.client-info h4 {
    font-size: 1.3em;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.client-info p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.95em;
}

.partnership-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--primary-red);
    font-weight: 600;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.section-footer {
    margin-top: 80px;
    text-align: center;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--primary-red);
    display: block;
}

.stat-label {
    font-size: 1em;
    color: var(--text-gray);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

/* Responsive for Clients Section */
@media (max-width: 768px) {
    .clients-section {
        padding: 80px 0;
    }
    .category-tabs {
        gap: 10px;
    }
    .category-tab {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .stats-row {
        gap: 30px;
    }
    .stat-number {
        font-size: 2.2em;
    }
}
