/* Critical CSS for above-the-fold content */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    visibility: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-display: swap;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

body.loaded {
    visibility: visible;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.navbar {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

body.loaded .navbar {
    opacity: 1;
}

/* ============================================
   UNIVERSAL PAGE CONTENT STYLES
   Use for: About, Contact, Products, Services, etc.
   ============================================ */

.page-content-section {
    padding: 0px 0 0px;
    background-color: #ffffff;
}

/* ============================================
   PAGE TITLE
   ============================================ */

.page-title {
    font-size: 3rem;
    font-weight: 500;
    color: #2F4F4F;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #F19138 0%, #ff6b2c 100%);
    border-radius: 2px;
    margin-bottom: 2rem;
}

/* ============================================
   HERO IMAGE
   ============================================ */

.page-hero-image {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.page-hero-image:hover img {
    transform: scale(1.05);
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(47, 79, 79, 0.3) 0%,
        rgba(224, 83, 12, 0.2) 100%
    );
    pointer-events: none;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.page-content {
    background: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.content-block {
    margin-bottom: 3rem;
}

.content-block:last-child {
    margin-bottom: 0;
}

/* Intro Block - Special styling */
.intro-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 1px solid #F19138;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: justify;   /* This aligns both left and right */
    text-justify: inter-word; /* Optional: improves spacing */
}

/* ============================================
   CONTENT TYPOGRAPHY
   ============================================ */

.content-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #2F4F4F;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.content-subheading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2F4F4F;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-subheading i {
    color: #F19138;
    font-size: 1.75rem;
}

.content-text {
    font-size: 1.1rem;
    color: #5a6c7d;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: justify;   /* This aligns both left and right */
    text-justify: inter-word; /* Optional: improves spacing */
}

.content-text:last-child {
    margin-bottom: 0;
}

/* Content Links */
.content-link {
    color: #F19138;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.content-link:hover {
    color: #2F4F4F;
    border-bottom-color: #F19138;
}

/* ============================================
   CONTENT CTA BUTTONS
   ============================================ */

.content-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;  /* centers horizontally */
    align-items: center;      /* centers vertically */
    text-align: center;       /* optional: centers text inside child items */
}

.btn-cta-primary,
.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.25rem 2rem; 
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    min-width: 300px;   /* minimum button width */
    text-align: center; /* keeps text centered */
    justify-content: center;  /* centers horizontally */
}

.btn-cta-primary {
    background-color: #F19138;
    color: #ffffff;
    border-color: #F19138;
    box-shadow: 0 4px 15px rgba(224, 83, 12, 0.3);
}

.btn-cta-primary:hover {
    background: linear-gradient(135deg, #ff6b2c 0%, #F19138 100%);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(224, 83, 12, 0.4);
}

.btn-cta-secondary {
    background: #ffffff;
    color: #2F4F4F;
    border-color: #2F4F4F;
    box-shadow: 0 4px 15px rgba(47, 79, 79, 0.1);
}

.btn-cta-secondary:hover {
    background: #2F4F4F;
    color: #ffffff;
    border-color: #2F4F4F;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(47, 79, 79, 0.2);
}

.btn-cta-primary i,
.btn-cta-secondary i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.btn-cta-primary:hover i,
.btn-cta-secondary:hover i {
    transform: translateX(5px);
}

/* ============================================
   TABLET RESPONSIVE (768px - 991px)
   ============================================ */

@media (max-width: 991.98px) {
    .page-content-section {
        padding: 100px 0 60px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-hero-image {
        height: 350px;
    }

    .page-content {
        padding: 2.5rem;
    }

    .content-heading {
        font-size: 1.75rem;
    }

    .content-subheading {
        font-size: 1.35rem;
    }

    .content-text {
        font-size: 1.05rem;
    }

    .content-block {
        margin-bottom: 2.5rem;
    }

    .intro-block {
        padding: 2rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE (Below 768px)
   ============================================ */

@media (max-width: 767.98px) {
    .page-content-section {
        padding: 80px 0 50px;
    }

    .page-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .page-title-underline {
        width: 60px;
        height: 3px;
        margin-bottom: 1.5rem;
    }

    .page-hero-image {
        height: 280px;
    }

    .page-content {
        padding: 2rem 1.5rem;
    }

    .content-heading {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .content-subheading {
        font-size: 1.25rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .content-subheading i {
        font-size: 1.5rem;
    }

    .content-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .content-block {
        margin-bottom: 2rem;
    }

    .intro-block {
        padding: 1.5rem;
    }

    .content-cta {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 0.25rem 2rem; 
    }
}

/* ============================================
   SMALL MOBILE (Below 576px)
   ============================================ */

@media (max-width: 575.98px) {
    .page-content-section {
        padding: 70px 0 40px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-hero-image {
        height: 240px;
        border-radius: 12px;
    }

    .page-content {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .content-heading {
        font-size: 1.35rem;
    }

    .content-subheading {
        font-size: 1.15rem;
    }

    .content-text {
        font-size: 0.95rem;
    }

    .intro-block {
        padding: 1.25rem;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        font-size: 0.95rem;
        padding: 0.25rem 2rem; 
    }
}

/* ============================================
   LARGE SCREENS (1400px+)
   ============================================ */

@media (min-width: 1400px) {
    .page-content-section {
        padding: 50px 0 100px;
    }

    .page-title {
        font-size: 3.5rem;
    }

    .page-hero-image {
        height: 450px;
    }

    .page-content {
        padding: 3.5rem;
    }

    .content-heading {
        font-size: 2.25rem;
    }

    .content-subheading {
        font-size: 1.65rem;
    }

    .content-text {
        font-size: 1.15rem;
    }

    .intro-block {
        padding: 3rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .page-hero-image img,
    .btn-cta-primary,
    .btn-cta-secondary,
    .content-link {
        transition: none;
    }

    .page-hero-image:hover img,
    .btn-cta-primary:hover,
    .btn-cta-secondary:hover {
        transform: none;
    }

    .btn-cta-primary:hover i,
    .btn-cta-secondary:hover i {
        transform: none;
    }
}

/* Focus states */
.content-link:focus,
.btn-cta-primary:focus,
.btn-cta-secondary:focus {
    outline: 3px solid #F19138;
    outline-offset: 4px;
    border-radius: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .page-title,
    .content-heading,
    .content-subheading {
        color: #000000;
    }

    .content-text {
        color: #333333;
    }

    .page-content {
        border: 2px solid #2F4F4F;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .page-content-section {
        padding: 2rem 0;
    }

    .page-hero-image {
        height: auto;
        max-height: 300px;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .hero-image-overlay {
        display: none;
    }

    .page-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .content-cta {
        display: none;
    }
}