/* Rural Economic Forum Page Styles - Pixel Perfect Match to React Components */

/* Page-specific variables */
:root {
    --ref-green: #10b981;
    --ref-green-dark: #059669;
    --ref-green-light: #34d399;
    --ref-slate-900: #0f172a;
    --ref-slate-800: #1e293b;
    --ref-blue-900: #1e3a8a;
}

/* REF Hero Section - Image Based */
.ref-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.ref-hero-image-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ref-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Dark overlay for hero - REMOVED to show background image clearly */

/* Hero content styling for white text on dark overlay */
.ref-hero h1,
.ref-hero .visually-hidden {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

/* Accessibility - Hidden content for screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Rural Economic Forum specific logo styling - Make header logo bigger */
.logo {
    width: auto;
    height: 3rem;
}

@media (min-width: 768px) {
    .logo {
        height: 4rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ref-hero {
        height: 70vh;
        min-height: 500px;
    }
}

.ref-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ref-green);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: scale(1);
}

.ref-btn-primary:hover {
    background: var(--ref-green-dark);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.05);
}

.ref-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ref-green);
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ref-btn-secondary:hover {
    background: var(--ref-green-dark);
}


/* Section Containers */
.ref-section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .ref-section-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .ref-section-container {
        padding: 0 2rem;
    }
}

.ref-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.ref-section-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #1f2937;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .ref-section-title {
        font-size: 3rem;
    }
}

.ref-section-subtitle {
    font-size: 1.25rem;
    color: rgb(107, 114, 128);
    max-width: 48rem;
    margin: 0 auto;
}

/* About REF Section */
.ref-about {
    padding: 5rem 0;
    background: #ffffff;
}

.ref-about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .ref-about-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.ref-about-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: rgba(30, 58, 138, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 320px;
}

.ref-about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.ref-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.ref-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ref-about-card:hover .ref-card-image img {
    transform: scale(1.05);
}

.ref-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 58, 138, 0.7), transparent);
}

.ref-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(30, 58, 138, 0.95), rgba(30, 58, 138, 0.8));
}

.ref-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.ref-about-card:hover .ref-card-title {
    color: var(--ref-green-light);
}

.ref-card-description {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Vision Section */
.ref-vision {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e293b 100%);
    color: white;
}

.ref-vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .ref-vision-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ref-vision-content {
    space-y: 2rem;
}

.ref-vision-text {
    margin-bottom: 2rem;
}

.ref-vision-heading {
    font-size: 1.875rem;
    font-weight: 300;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ref-vision-heading {
        font-size: 2.25rem;
    }
}

.ref-vision-highlight {
    color: var(--ref-green-light);
    font-weight: 600;
}

.ref-vision-description {
    space-y: 1rem;
}

.ref-vision-description p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.ref-vision-pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ref-pillar {
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    color: var(--ref-green);
    border-radius: 9999px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
}

.ref-vision-image {
    position: relative;
}

.ref-vision-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.ref-vision-img {
    width: 100%;
    height: 24rem;
    object-fit: cover;
}

.ref-vision-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}

/* Strategic Themes Section */
.ref-themes {
    padding: 5rem 0;
    background: #ffffff;
}

.ref-themes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .ref-themes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ref-themes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ref-theme-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 1;
    background: rgb(229, 231, 235);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ref-theme-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.ref-theme-image {
    position: absolute;
    inset: 0;
}

.ref-theme-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ref-theme-card:hover .ref-theme-image img {
    opacity: 0.9;
}

.ref-theme-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2), transparent);
}

.ref-theme-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    text-align: left;
}

.ref-theme-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .ref-theme-title {
        font-size: 1.5rem;
    }
}

.ref-theme-description {
    font-size: 0.875rem;
    color: rgb(147, 197, 253);
    font-weight: 300;
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .ref-theme-description {
        font-size: 1rem;
    }
}

/* Focus Sectors Section */
.ref-sectors {
    padding: 5rem 0;
    background: #f3f4f6;
}

.ref-sectors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .ref-sectors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ref-sectors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ref-sector-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: linear-gradient(to bottom right, var(--ref-blue-900), var(--ref-slate-900));
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ref-sector-card:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.ref-sector-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.ref-sector-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ref-sector-card:hover .ref-sector-image img {
    transform: scale(1.1);
}

.ref-sector-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.ref-sector-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}

.ref-sector-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.ref-sector-card:hover .ref-sector-title {
    color: var(--ref-green-light);
}

/* Main Objectives Section */
.ref-objectives {
    padding: 5rem 0;
    background: #ffffff;
}

.ref-objectives-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .ref-objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ref-objectives-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ref-objective-card {
    background: var(--ref-slate-800);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #10b981;
}

.ref-objective-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.ref-objective-text {
    color: white;
    font-weight: 500;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.ref-objective-card:hover .ref-objective-text {
    color: var(--ref-green-light);
}

.ref-objectives-cta {
    text-align: center;
    margin-top: 4rem;
}

/* Newsletter Section */
.ref-newsletter {
    padding: 4rem 0;
    background: var(--ref-slate-800);
}

.ref-newsletter-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .ref-newsletter-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .ref-newsletter-container {
        padding: 0 2rem;
    }
}

.ref-newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ref-newsletter-content {
        flex-direction: row;
    }
}

.ref-newsletter-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ref-newsletter-icon {
    width: 3rem;
    height: 3rem;
    background: var(--ref-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-icon-text {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
}

.ref-newsletter-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
}

.ref-newsletter-subtitle {
    font-size: 0.875rem;
    color: rgb(209, 213, 219);
}

/* REF Future Pathways Section */
.ref-future-pathways {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e293b 100%);
    color: white;
}

/* Horizontal scroll container for pathways */
.ref-pathways-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 197, 94, 0.5) rgba(255, 255, 255, 0.1);
}

.ref-pathways-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.ref-pathways-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ref-pathways-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.5);
    border-radius: 10px;
}

.ref-pathways-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.7);
}

.ref-pathways-grid {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    width: max-content;
}

.ref-pathway-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0 2rem 2rem 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    flex: 0 0 350px;
    min-height: 450px;
}

.ref-pathway-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
}

.ref-pathway-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ref-pathway-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.ref-pathway-card .ref-pathway-number {
    position: relative;
    z-index: 2;
    margin-top: calc(40% + 1rem);
}

.ref-pathway-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--ref-green-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ref-pathway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ref-green), var(--ref-green-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ref-pathway-card:hover::before {
    transform: scaleX(1);
}

.ref-pathway-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--ref-green-light);
    line-height: 1;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.ref-pathway-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.ref-pathway-card:hover .ref-pathway-title {
    color: var(--ref-green-light);
}

.ref-pathway-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

.ref-pathway-description p {
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.ref-pathway-description p:last-child {
    margin-bottom: 0;
}

.ref-pathway-card:hover .ref-pathway-description p {
    color: rgba(255, 255, 255, 0.95);
}

/* Future Pathways section header override */
.ref-future-pathways .ref-section-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes videoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(0.5deg);
    }
    66% {
        transform: translateY(5px) rotate(-0.5deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ref-hero {
        padding: 4rem 0;
    }
    
    .ref-hero-content-grid {
        gap: 2rem;
        min-height: auto;
    }
    
    .ref-logo-center {
        width: 120px;
        height: 120px;
    }
    
    .ref-hero-top-logo {
        top: 1rem;
    }
    
    .ref-hero-container {
        padding-top: 8rem;
    }
    
    .ref-video-container {
        width: 100%;
        max-width: 400px;
        height: 300px;
    }
    
    .ref-video-wrapper {
        height: 250px;
    }
    
    .ref-section-header {
        margin-bottom: 2rem;
    }
    
    .ref-about,
    .ref-vision,
    .ref-themes,
    .ref-sectors,
    .ref-objectives {
        padding: 2rem 0 1rem 0;
    }

    /* About REF - Mobile Swipe */
    .ref-about .ref-section-container {
        overflow: visible;
        max-width: none;
        padding: 0;
    }

    .ref-about .ref-section-header {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .ref-about-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 0 1rem 1rem 1rem;
        scrollbar-width: none;
        max-width: none;
        width: 100%;
    }
    .ref-about-grid::-webkit-scrollbar { display: none; }

    .ref-about-card {
        flex: 0 0 80vw;
        min-width: 80vw;
        max-width: 80vw;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        height: 280px;
    }

    /* Strategic Pillars - Mobile Swipe */
    .ref-themes .ref-section-container {
        overflow: visible;
        max-width: none;
        padding: 0;
    }

    .ref-themes .ref-section-header {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .ref-themes-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 0 1rem 1rem 1rem;
        scrollbar-width: none;
        max-width: none;
        width: 100%;
    }
    .ref-themes-grid::-webkit-scrollbar { display: none; }

    .ref-theme-card {
        flex: 0 0 80vw;
        min-width: 80vw;
        max-width: 80vw;
        aspect-ratio: auto;
        height: 280px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
}