/**
 * Additional Styles for ITCO Ltd Theme
 *
 * @package ITCO_Theme
 */

/* ===========================
   SMOOTH SCROLLING
   =========================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* ===========================
   HERO SECTION WITH BACKGROUND IMAGE
   =========================== */

.hero-section {
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(12 4 50 / 92%) 0%, rgb(12 4 50 / 88%) 100%);
}

/* ===========================
   IMAGE OVERLAY STYLES
   =========================== */

.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
}

.image-overlay img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.image-overlay .overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: #ffffff;
    z-index: 1;
}

/* ===========================
   SERVICE CARDS WITH ICONS
   =========================== */

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card .card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.service-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-card h4 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.service-card h4::before {
    display: none;
}

/* ===========================
   IMAGE GALLERY GRID
   =========================== */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 102, 204, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item .gallery-overlay span {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===========================
   PARALLAX SECTIONS
   =========================== */

.parallax-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.85);
}

.parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.parallax-content h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.parallax-content p {
    color: #cccccc;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ===========================
   TESTIMONIALS / QUOTES
   =========================== */

.testimonial-section {
    background: #f8f9fa;
    padding: 80px 0;
}

.testimonial-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 5rem;
    color: #0066cc;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card p {
    font-style: italic;
    color: #4a4a4a;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial-card .author {
    font-weight: 600;
    color: #1a1a1a;
}

.testimonial-card .position {
    font-size: 0.9rem;
    color: #999999;
}

/* ===========================
   STATS SECTION WITH BACKGROUND
   =========================== */

.stats-section {
    background-image: url('../images/city-skyline.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
}

.stats-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-block {
    text-align: center;
    padding: 30px;
}

.stat-block .stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: #0066cc;
    display: block;
    margin-bottom: 10px;
}

.stat-block .stat-label {
    font-size: 0.9rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===========================
   FEATURED IMAGE SECTIONS
   =========================== */

.featured-image-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.featured-image-section .image-side {
    background-size: cover;
    background-position: center;
    min-height: 500px;
}

.featured-image-section .content-side {
    display: flex;
    align-items: center;
    padding: 80px;
    background: #ffffff;
}

.featured-image-section .content-side h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.featured-image-section .content-side p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a4a4a;
}

/* Reverse layout */
.featured-image-section.reverse .image-side {
    order: 2;
}

.featured-image-section.reverse .content-side {
    order: 1;
}

/* ===========================
   POST GRID STYLES
   =========================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.post-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.post-content {
    padding: 30px;
}

.post-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.post-content h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.post-content h3 a:hover {
    color: #0066cc;
}

.post-meta {
    font-size: 0.85rem;
    color: #999999;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    color: #0066cc;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #004499;
    text-decoration: underline;
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e8e8e8;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    background: #f8f9fa;
    border-color: #cccccc;
    color: #1a1a1a;
}

.pagination .page-numbers.current {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

/* ===========================
   PAGE CONTENT
   =========================== */

.page-content {
    max-width: 900px;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content h2 {
    font-size: 1.75rem;
}

.page-content h3 {
    font-size: 1.5rem;
}

.page-content p {
    color: #4a4a4a;
    line-height: 1.7;
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: #4a4a4a;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.page-content blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 20px;
    margin: 2rem 0;
    font-style: italic;
    color: #666666;
}

.page-content a {
    color: #0066cc;
}

.page-content a:hover {
    color: #004499;
}

/* ===========================
   WIDGET STYLES
   =========================== */

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #4a4a4a;
    font-size: 0.95rem;
}

.widget a:hover {
    color: #0066cc;
}

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

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0066cc;
    color: #ffffff;
    padding: 8px 15px;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    .site-header,
    .site-footer,
    .menu-toggle {
        display: none !important;
    }

    .hero-section {
        margin-top: 0;
        padding: 20px;
        background: #ffffff !important;
    }

    .hero-text h1 {
        color: #000000;
    }

    .hero-text p,
    .hero-text .subtitle {
        color: #333333;
    }

    .stat-number {
        color: #000000;
    }

    .stat-label {
        color: #333333;
    }

    .content-section {
        padding: 20px 0;
    }

    .service-card {
        border: 1px solid #cccccc;
        background: #ffffff;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }
}
