/*
Theme Name: Etqan
Author: JIGS GFX
Description: A custom WordPress theme based on specific design requirements.
Version: 1.0
Text Domain: etqan
*/

:root {
    --color-deep-purple: #4B0F5A;
    --color-magenta: #C51E7E;
    --color-dark-navy: #082B4B;
    --color-light-gray: #EDF0F4;
    --color-heading: #102A45;
    --color-body: #46607A;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}


.page-template-page-inner {
    --color-dark-navy: #002D5A;
    --color-magenta: #A21B70;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
}

/* Inner Hero */
.inner-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}

.inner-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 45%;
    background: linear-gradient(90deg, rgba(0,45,90,0.75) 0%, rgba(0,45,90,0.0) 100%);
}

article {
    margin-top:40px;
}

.inner-hero .container {
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
}

.inner-hero-title {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 4.5rem;
    margin: 0;
    text-align: left;
    text-shadow: 0 3px 18px rgba(0,45,90,0.45);
}

/* Inner Layout and Content */
.inner-layout {
    position: relative;
}

.inner-content {
    color: #3b4b5c;
    max-width: 900px;
    margin-left: 0;
    margin-right: auto;
    padding: 40px 0;
}

.commitment-quote {
    color: var(--color-dark-navy);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 30px;
}

/* Fixed Social Sidebar */
.social-sidebar {
    position: fixed;
    right: 10px;
    top: 40%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.social-sidebar a {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #1E4E74;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

/* Inner Widgets */
.inner-widgets {
    padding: 60px 0;
}

.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.knowledge-hub h3,
.follow-us h3 {
    color: var(--color-dark-navy);
    font-weight: 700;
    margin-bottom: 16px;
}

.hub-form {
    display: flex;
    gap: 10px;
}

.hub-form input[type="email"] {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.hub-form .btn-magenta {
    background: var(--color-magenta);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 4px;
    font-weight: 700;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.social-icons .icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #1E4E74;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

.contact-us.btn {
    display: inline-block;
    background: var(--color-magenta);
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 992px) {
    .widgets-grid {
        grid-template-columns: 1fr;
    }
    .social-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .inner-hero-title {
        font-size: 3.2rem;
        text-shadow: 0 2px 12px rgba(0,45,90,0.4);
    }
}

@media (max-width: 480px) {
    .inner-hero-title {
        font-size: 2.4rem;
        text-shadow: 0 2px 10px rgba(0,45,90,0.35);
    }
}

/* Reset & Basics */
body {
    font-family: var(--font-body);
    color: var(--color-body);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    margin-top: 0;
    font-weight: 700;
}

*, *::before, *::after {
    box-sizing: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.site-main a:not(.btn) {
    color: var(--color-magenta);
}

.site-main a:not(.btn):hover {
    text-decoration: underline;
}

/* Stronger selectors to ensure inner pages/posts/news use pink links */
.site-main .entry-content a:not(.btn),
.site-main .inner-content a:not(.btn),
.site-main article a:not(.btn),
.site-main .news-body a:not(.btn),
.site-main .news-excerpt a:not(.btn) {
    color: var(--color-magenta);
}
.site-main .entry-content a:visited:not(.btn),
.site-main .inner-content a:visited:not(.btn),
.site-main article a:visited:not(.btn),
.site-main .news-body a:visited:not(.btn),
.site-main .news-excerpt a:visited:not(.btn) {
    color: var(--color-magenta);
}
.site-main .entry-content a:active:not(.btn),
.site-main .inner-content a:active:not(.btn),
.site-main article a:active:not(.btn),
.site-main .news-body a:active:not(.btn),
.site-main .news-excerpt a:active:not(.btn) {
    color: var(--color-magenta);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: transparent;
    border: 2px solid var(--color-heading);
    color: var(--color-heading);
}

.btn-primary:hover {
    background-color: var(--color-heading);
    color: #fff;
    transform: translateY(-2px);
}

.btn-magenta {
    background-color: var(--color-magenta);
    color: #fff;
    border: 2px solid var(--color-magenta);
}

.btn-magenta:hover {
    background-color: #a01866;
    border-color: #a01866;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(197, 30, 126, 0.3);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Top Utility Bar */
.top-bar {
    background-color: var(--color-deep-purple);
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end; /* Align right as per typical utility bars, or space-between if links on left */
    align-items: center;
    gap: 20px;
}

.top-links a {
    color: #fff;
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.top-links-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-links-menu li {
    display: inline-flex;
    align-items: center;
}

.top-links a:hover {
    color: var(--color-magenta);
}

.top-search {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2px 10px;
}

.search-field {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    width: 150px;
}

.search-field::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-submit {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

/* Main Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.main-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: height 0.3s ease;
}

.site-header--scrolled .main-header-inner {
    height: 70px;
}

.site-branding h1 {
    margin: 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-branding img {
    max-height: 70px; /* Reduced from default/automatic height */
    width: auto;
    
}

.site-branding a {
    color: var(--color-heading);
}

.main-navigation ul {
    display: flex;
    gap: 30px;
}

.main-navigation a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-heading);
    text-transform: uppercase;
}

.main-navigation a:hover {
    color: var(--color-magenta);
}

.main-navigation ul li {
    position: relative;
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: var(--color-magenta);
    padding: 18px 24px;
    border-radius: 3px;
    box-shadow: 0 12px 28px rgba(197, 30, 126, 0.35);
    min-width: 420px;
    text-align: center;
    z-index: 1000;
}

.main-navigation .sub-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--color-magenta);
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    display: block;
    margin: 0;
}

.main-navigation .sub-menu a {
    color: #fff;
    font-weight: 700;
    text-transform: none;
    font-size: 1rem;
    display: block;
}

.main-navigation .sub-menu a:hover {
    color: #fff;
    opacity: 0.9;
}

.menu-toggle {
    display: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 600px; /* Adjust as needed */
    display: flex;
    align-items: flex-end; /* Aligns content to the bottom */
    padding-bottom: 50px; /* Adds space from the bottom edge */
}

.hero-section .container {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Ensure left alignment */
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}
.hero-slide {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Ensure slider content hugs the left edge */
.hero-slider .container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 992px) {
    .hero-slider {
        min-height: 600px;
    }
    .hero-slide {
        min-height: 600px;
    }
}

.hero-content-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    max-width: 550px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 4px;
    margin: 0; 
    margin-right: auto; /* Pushes box to the left */
}

.hero-title {
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title-top {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-deep-purple);
    text-transform: uppercase;
}

.hero-title-bottom {
    display: block;
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-heading);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-body);
    margin-bottom: 0;
}

/* Solutions Section */
.solutions-section {
    background-color: #ECEFF1;
    padding: 80px 0;
}

.solutions-top-image {
    margin-bottom: 40px;
    width: 100%;
}

.solutions-top-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.solutions-header {
    margin-bottom: 40px;
}

.solutions-header .section-title {
    font-size: 2.5rem;
    color: var(--color-dark-navy);
    margin-bottom: 15px;
    font-weight: 700;
}

.solutions-header .section-desc {
    font-size: 1.1rem;
    color: var(--color-body);
    max-width: 800px;
    line-height: 1.6;
}

/* Solutions List */
.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.solution-card {
    background: rgba(255,255,255,0.6);
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(8,43,75,0.12);
    padding: 28px 36px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255,255,255,0.9);
    width: 100%;
    max-width: 900px;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.solution-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.solution-icon {
    flex-shrink: 0;
    width: 88px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.solution-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--color-deep-purple);
}

.solution-title {
    font-size: 1.05rem;
    color: var(--color-dark-navy);
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.solution-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* News Section */
.news-section {
    padding: 80px 0;
    background: #fff;
}

.news-archive-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}

.news-archive-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, rgba(0,45,90,0.70) 0%, rgba(0,45,90,0.0) 100%);
}

.news-archive-hero .container {
    position: relative;
    z-index: 2;
    padding-bottom: 30px;
}

.news-archive-title {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3.2rem;
    margin: 0;
    text-align: left;
    text-shadow: 0 3px 18px rgba(0,45,90,0.45);
}

.news-title {
    color: var(--color-dark-navy);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size:40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(8,43,75,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-heading {
    font-size: 1.2rem;
    color: var(--color-heading);
    margin: 0;
    font-weight: 700;
}

.news-excerpt {
    color: var(--color-body);
    margin: 0;
}

.news-readmore {
    align-self: flex-start;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 8px;
}

.news-viewall {
    text-align: center;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-archive-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-archive-title {
        font-size: 2.2rem;
    }
}

/* Partners Section */
.partners-section {
    background-color: var(--color-dark-navy);
    padding: 80px 0;
    position: relative;
    overflow: hidden; /* Hide overflow from potential decorative elements */
}

/* Optional: Subtle gradient to mimic left-side color flare */
.partners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(197, 30, 126, 0.4) 0%, rgba(8, 43, 75, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.partners-section .container {
    position: relative;
    z-index: 2;
}

.partners-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align button to bottom of text block */
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.partners-heading {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 5px;
    line-height: 1;
}

.partners-subheading {
    color: #fff;
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 Columns exactly */
    gap: 20px;
}

.partner-item {
    background: #fff;
    padding: 10px; /* Outer white border effect */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    border-radius: 0; /* Square corners as per image */
    transition: transform 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-5px);
}

.partner-logo-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9; /* Slight inner offset if needed, or keep white */
    overflow: hidden;
}

.partner-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 8px;
}

.partner-name {
    font-weight: 700;
    color: var(--color-heading);
    font-size: 0.8rem;
    text-align: center;
}

/* Update Button Style for Partners */
.partners-cta .btn-square {
    border-radius: 0;
    padding: 10px 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.site-footer {
    color: var(--color-dark-navy);
}

.footer-widgets {
    background: #ECEFF1;
    padding: 40px 0 20px;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.footer-title {
    color: var(--color-dark-navy);
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-hub-form {
    display: flex;
    gap: 10px;
}

.footer-hub-form input[type="email"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #bfc7d1;
    border-radius: 2px;
    background: #fff;
}

.footer-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0F3C68;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-contact-btn {
    font-size: 0.9rem;
    padding: 10px 18px;
}

.footer-bottom {
    background-color: var(--color-dark-navy);
    color: #fff;
    padding: 12px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    margin-right: 20px;
    font-size: 0.9rem;
}

.footer-links-list {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.footer-links-list li {
    display: inline-flex;
    align-items: center;
}

.footer-links-list a {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
}

.footer-copy {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-icons {
        flex-wrap: wrap;
    }
    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-links-list {
        gap: 12px;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        position: relative;
        padding: 10px 14px;
        z-index: 1100;
        color: #a71649;
    }
    .menu-toggle::before {
        content: '☰';
        font-size: 1.4rem;
        margin-right: 8px;
    }
    .menu-toggle[aria-expanded="true"]::before {
        content: '✕';
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 900;
    }
    
    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .inner-content {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        padding: 20px 0;
    }

    .main-navigation .sub-menu {
        position: static;
        transform: none;
        min-width: 0;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
        border-radius: 3px;
        padding: 12px 14px;
        text-align: left;
    }

    .main-navigation .sub-menu::before {
        display: none;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
    }

    .hero-title-top {
        font-size: 3rem;
    }
    
    .hero-title-bottom {
        font-size: 2rem;
    }

    .top-bar-inner {
        flex-direction: column;
        gap: 10px;
    }

    .top-links a {
        margin: 0 10px;
    }
}

.site-main .wp-block-embed,
.site-main .wp-block-video {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.site-main .wp-block-embed__wrapper,
.site-main .wp-block-embed iframe,
.site-main .wp-block-video video {
    width: 100%;
    display: block;
}

/* Classic editor/plain iframe embeds */
.site-main .entry-content iframe,
.site-main .inner-content iframe {
    display: block;
    max-width: 70%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .site-main .wp-block-embed,
    .site-main .wp-block-video {
        max-width: 100%;
    }
    .site-main .entry-content iframe,
    .site-main .inner-content iframe {
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .site-main .wp-block-embed iframe,
    .site-main .wp-block-video video,
    .site-main .entry-content iframe,
    .site-main .inner-content iframe {
        min-height: 500px;
    }
}
