/* ==========================================
   SECTORS PAGE STYLES
   Matched to Homepage Compact Scale
   Legacy Protection Services
========================================== */

/* ------------------------------------------
   SECTORS SECTION (Main Content)
------------------------------------------ */
.sectors-section {
    padding: clamp(48px, 6vw, 80px) 0;
    background: #F0F2F5;  /* Matched to services grey sections */
}

/* ------------------------------------------
   INTRO SECTION
------------------------------------------ */
.sectors-intro {
    max-width: 800px;
    margin: 0 auto 2.5rem;  /* Reduced from 3rem */
    text-align: center;
}

.intro-badge {
    display: inline-block;
    background: rgba(214, 154, 59, 0.12);
    color: var(--color-primary-dark);
    font-size: 0.7rem;  /* Reduced from 0.75rem - matches homepage */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.9rem;  /* Reduced padding */
    border-radius: 40px;
    margin-bottom: 0.75rem;  /* Reduced from 1rem */
}

.sectors-intro h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);  /* Reduced from 1.8-2.3rem - matches homepage */
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.sectors-intro p {
    font-size: 0.9rem;  /* Reduced from 1rem - matches homepage */
    line-height: 1.65;
    color: var(--color-text-light);
}

/* ------------------------------------------
   FILTER BUTTONS
------------------------------------------ */
.sector-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;  /* Reduced from 0.75rem */
    margin-bottom: 2rem;  /* Reduced from 2.5rem */
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.4rem 1rem;  /* Reduced from 0.6rem 1.2rem */
    border-radius: 40px;
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(214, 154, 59, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-black);
    font-weight: 600;
}

/* ------------------------------------------
   SECTORS GRID
------------------------------------------ */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* Fixed 3 columns */
    gap: 1.5rem;  /* Reduced from 2rem */
    margin-bottom: 2rem;
}

/* Sector Card - Matching homepage service-card */
.sector-card {
    background: var(--color-white);
    border-radius: 1rem;  /* Reduced from 1.25rem - matches homepage */
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.sector-card:hover {
    transform: translateY(-4px);  /* Matched to homepage */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(214, 154, 59, 0.2);
}

.sector-card__image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.sector-card__image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sector-card:hover .sector-card__image-img {
    transform: scale(1.02);
}

.sector-card__content {
    padding: 1.25rem;  /* Reduced from 1.5rem - matches homepage */
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sector-icon {
    position: absolute;
    top: -20px;  /* Reduced from -20px (kept same) */
    right: 1.25rem;
    width: 40px;  /* Reduced from 48px - matches homepage */
    height: 40px;  /* Reduced from 48px */
    background: var(--color-primary);
    border-radius: 10px;  /* Reduced from 12px - matches homepage */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(214, 154, 59, 0.3);
}

.sector-icon i {
    font-size: 1.1rem;  /* Reduced from 1.5rem - matches homepage */
    color: var(--color-black);
}

.sector-card__content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;  /* Reduced from 1.25rem - matches homepage */
    font-weight: 700;
    color: var(--color-black);
    margin: 0.5rem 0 0.5rem;  /* Reduced margins */
    padding-right: 2.5rem;  /* Reduced from 3rem */
    line-height: 1.4;
}

.sector-card__content p {
    font-size: 0.8rem;  /* Reduced from 0.9rem - matches homepage */
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 0.875rem;
}

.sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 1rem;
}

.sector-tags span {
    background: rgba(214, 154, 59, 0.08);
    padding: 0.2rem 0.65rem;  /* Reduced padding - matches homepage */
    border-radius: 30px;
    font-size: 0.65rem;  /* Reduced from 0.7rem - matches homepage */
    font-weight: 500;
    color: var(--color-primary-dark);
}

.sector-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;  /* Reduced from 0.85rem - matches homepage */
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: auto;
    transition: all 0.2s ease;
}

.sector-link i {
    transition: transform 0.2s ease;
    font-size: 0.65rem;
}

.sector-link:hover {
    gap: 0.75rem;
    color: var(--color-primary-dark);
}

.sector-link:hover i {
    transform: translateX(3px);
}

/* ------------------------------------------
   NO RESULTS MESSAGE
------------------------------------------ */
.no-results {
    text-align: center;
    padding: 2rem;  /* Reduced from 3rem */
    background: var(--color-white);
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.no-results i {
    font-size: 2rem;  /* Reduced from 3rem */
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.no-results h3 {
    font-size: 1rem;  /* Reduced from 1.25rem */
    margin-bottom: 0.35rem;
    color: var(--color-black);
}

.no-results p {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--color-primary);
    padding: 0.4rem 1.2rem;  /* Reduced from 0.6rem 1.5rem */
    border-radius: 40px;
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: var(--color-primary);
    color: var(--color-black);
}

/* ------------------------------------------
   REVEAL ANIMATIONS
------------------------------------------ */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Override CTA Section to White for better separation */
.sectors-page .cta-section {
    background: #ffffff;
}

/* Optional: Add a subtle border-top to the CTA for separation */
.sectors-page .cta-section {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ------------------------------------------
   ENHANCED RESPONSIVE BREAKPOINTS
   Matched to Homepage System
------------------------------------------ */

/* Tablet landscape & smaller desktops */
@media (max-width: 1100px) {
    .sectors-grid {
        gap: 1.25rem;
    }
    
    .sector-card__image {
        height: 180px;
    }
    
    .sector-card__content {
        padding: 1rem;
    }
    
    .sector-card__content h3 {
        font-size: 0.95rem;
        padding-right: 2rem;
    }
    
    .sector-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.35rem 0.9rem;
        font-size: 0.7rem;
    }
}

/* Tablet portrait */
@media (max-width: 991px) {
    .sectors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .sector-filters {
        flex-wrap: wrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .sectors-section {
        padding: clamp(40px, 5vw, 60px) 0;
    }
    
    .sectors-intro {
        margin-bottom: 1.5rem;
    }
    
    .sectors-intro h2 {
        font-size: 1.2rem;
    }
    
    .sectors-intro p {
        font-size: 0.85rem;
    }
    
    .sector-filters {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.65rem;
    }
    
    .sectors-grid {
        gap: 1rem;
    }
    
    .sector-card__image {
        height: 180px;
    }
    
    .sector-card__content {
        padding: 1rem;
    }
    
    .sector-icon {
        width: 36px;
        height: 36px;
        top: -18px;
        right: 1rem;
    }
    
    .sector-icon i {
        font-size: 0.9rem;
    }
    
    .sector-card__content h3 {
        font-size: 0.9rem;
        padding-right: 1.75rem;
    }
    
    .sector-card__content p {
        font-size: 0.75rem;
    }
    
    .sector-tags span {
        font-size: 0.6rem;
        padding: 0.15rem 0.55rem;
    }
    
    .sector-link {
        font-size: 0.7rem;
    }
}

/* Mobile portrait */
@media (max-width: 640px) {
    .sectors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sector-card__image {
        height: 200px;
    }
    
    .no-results {
        padding: 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .sectors-intro h2 {
        font-size: 1.15rem;
    }
    
    .sectors-intro p {
        font-size: 0.8rem;
    }
    
    .intro-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.8rem;
    }
    
    .sector-filters {
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.25rem 0.7rem;
        font-size: 0.6rem;
    }
    
    .sector-card__image {
        height: 180px;
    }
    
    .sector-card__content {
        padding: 0.875rem;
    }
    
    .sector-card__content h3 {
        font-size: 0.85rem;
    }
    
    .sector-card__content p {
        font-size: 0.7rem;
    }
    
    .sector-icon {
        width: 32px;
        height: 32px;
        top: -16px;
        right: 0.875rem;
    }
    
    .sector-icon i {
        font-size: 0.8rem;
    }
    
    .no-results i {
        font-size: 1.5rem;
    }
    
    .no-results h3 {
        font-size: 0.9rem;
    }
    
    .no-results p {
        font-size: 0.7rem;
    }
    
    .reset-btn {
        font-size: 0.65rem;
        padding: 0.3rem 1rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .sectors-grid {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Touch device optimization */
@media (hover: none) {
    .sector-card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }
    
    .sector-card:hover .sector-card__image-img {
        transform: none;
    }
    
    .filter-btn:hover {
        transform: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sector-card,
    .filter-btn,
    .sector-link,
    .sector-card__image-img,
    .reveal-item {
        transition: none;
    }
    
    .sector-card:hover {
        transform: none;
    }
    
    .reveal-item {
        opacity: 1;
        transform: none;
    }
}