/* 
    ObaObinrin Portfolio Design System
    Professional, Modern, and Organic
*/

:root {
    --primary-color: #1E3932; /* Deep Forest Green */
    --primary-light: #2D5A4C;
    --accent-color: #C19A6B; /* Desert Sand/Gold */
    --accent-hover: #A68058;
    --bg-color: #FDFCFB; /* Soft Pearl White */
    --text-dark: #2D3436;
    --text-light: #636E72;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-color: #0F0F0F;
    --text-dark: #FFFFFF; /* Pure white for max contrast */
    --text-light: #CCCCCC;
    --white: #1A1A1A;
    --glass: rgba(15, 15, 15, 0.9);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --primary-color: #C19A6B;
}

body.dark-mode .btn-primary,
body.dark-mode .btn-accent,
body.dark-mode .btn {
    color: #0F0F0F !important; /* Ensure buttons have dark text on gold background */
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-accent:hover {
    color: #0F0F0F !important;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode footer p,
body.dark-mode footer h3,
body.dark-mode footer a,
body.dark-mode .footer-logo,
body.dark-mode .section-title,
body.dark-mode .gallery-grid h3 {
    color: #FFFFFF !important;
}

body.dark-mode .section-title::before {
    opacity: 0.1;
    color: var(--accent-color);
}

body.dark-mode .card, 
body.dark-mode .testimonial-card {
    background: #1A1A1A;
    border-color: rgba(193, 154, 107, 0.2);
}

body.dark-mode .traditions-section {
    background: #000000;
}

body.dark-mode .tradition-overlay h3,
body.dark-mode .tradition-overlay p {
    color: #FFFFFF !important;
}

body.dark-mode .card-icon,
body.dark-mode .contact-container i {
    color: var(--accent-color) !important;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%), url('../medias/hero-bg.jpg');
}

body.dark-mode .hero h1,
body.dark-mode .hero p {
    color: #FFFFFF !important;
}

body.dark-mode .hero h1 span {
    color: var(--accent-color) !important;
}

body.dark-mode .image-stack .stack-img {
    border-color: #1A1A1A;
}

body.dark-mode blockquote, 
body.dark-mode .quote-box {
    background: #1A1A1A !important;
    border-left-color: var(--accent-color) !important;
    color: #FFFFFF !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Typography Extensions */
.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::before {
    content: 'OBAOBINRIN';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    font-weight: 900;
    opacity: 0.03;
    letter-spacing: 15px;
    z-index: -1;
    white-space: nowrap;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(30, 57, 50, 0.2);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(193, 154, 107, 0.2);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0; /* Reduced padding */
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
    background: var(--white);
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(253, 252, 251, 0.95) 0%, rgba(253, 252, 251, 0.8) 100%), url('../medias/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(193, 154, 107, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.hero h1 span {
    display: block;
    font-size: 0.4em;
    text-transform: uppercase;
    letter-spacing: 10px; /* Increased letter spacing */
    color: var(--accent-color);
    margin-bottom: 2.5rem; /* Further increased spacing */
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .hero h1 { font-size: 4rem; }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding-top: 140px;
    }
    .hero-content {
        margin: 0 auto;
    }
    .hero h1 { font-size: 3rem; }
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    .hero-btns .btn {
        width: 100%;
        margin-left: 0 !important;
    }
    .hero::after {
        right: 50%;
        transform: translate(50%, -50%);
        width: 300px;
        height: 300px;
    }
}

/* Grid Sections */
.section {
    padding: 120px 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: rgba(30, 57, 50, 0.02);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

/* Solution Cards */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 1/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Traditions Section */
.traditions-section {
    background: #1e3932;
    background-image: radial-gradient(circle at 0% 0%, rgba(193, 154, 107, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 100% 100%, rgba(193, 154, 107, 0.1) 0%, transparent 50%);
    color: var(--white);
    padding: 120px 0;
}

.traditions-section .section-title {
    color: var(--white);
}

.traditions-section p {
    color: var(--white) !important;
}

.traditions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.tradition-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: var(--transition);
}

.tradition-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.tradition-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: var(--white);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.tradition-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.tradition-card:hover img {
    transform: scale(1.1);
}

.tradition-card:hover .tradition-overlay {
    transform: translateY(0);
    opacity: 1;
}

.tradition-overlay h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tradition-overlay p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.8;
}

@media (max-width: 1200px) {
    .traditions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .traditions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tradition-card {
        aspect-ratio: 16/9;
    }
    
    .tradition-overlay {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    }
}

/* Consultant Image Stack */
.consultant-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-stack {
    position: relative;
    width: 450px;
    height: 550px;
    margin-left: 0;
    cursor: pointer;
}

@media (max-width: 576px) {
    .image-stack {
        height: 350px;
        max-width: 280px;
    }
}

.stack-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    border: 5px solid var(--white);
    user-select: none;
}

/* Initial rotation for the stack */
.img1 { z-index: 5; transform: rotate(-3deg); }
.img2 { z-index: 4; transform: rotate(2deg) translate(15px, 15px); }
.img3 { z-index: 3; transform: rotate(-5deg) translate(30px, 30px); }
.img4 { z-index: 2; transform: rotate(4deg) translate(45px, 45px); }
.img5 { z-index: 1; transform: rotate(-2deg) translate(60px, 60px); }

/* Animation when sent to back */
.stack-img.sent-back {
    transform: translateX(120%) rotate(15deg) scale(0.8) !important;
    opacity: 0;
    z-index: 0 !important;
}

.image-stack:hover .stack-img {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Philosophy Section */
.philosophy-section {
    text-align: center;
}

.philosophy-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Testimonial Slider */
.testimonial-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 3rem;
}

.testimonial-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
}

.testimonial-card {
    flex: 0 0 100%; /* Default to one per slide on mobile */
    padding: 3rem 2rem;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .testimonial-track {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        transform: none !important;
    }
    
    .testimonial-card {
        flex: none;
    }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 3rem;
}

@media (min-width: 769px) {
    .slider-dots { display: none; }
}

.testimonial-card {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: visible;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    color: var(--accent-color);
    opacity: 0.2;
    font-family: serif;
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .grid { gap: 1rem; }
    .testimonial-card { padding: 2rem 1rem; }
    .testimonial-card p { font-size: 1rem; }
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent-color);
    width: 25px;
    border-radius: 10px;
}

.testimonial-card h4 {
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.testimonial-card small {
    color: var(--text-light);
    font-weight: 500;
}

.row2-card {
    max-width: 380px;
}

@media (max-width: 768px) {
    .row2-card {
        max-width: 100%;
    }
    
    header .container {
        padding: 0 1rem;
    }
    
    .btn-sm {
        padding: 0.6rem 1rem !important;
        font-size: 0.8rem !important;
    }
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 57, 50, 0.1);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.social-icon:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(193, 154, 107, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .contact-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
}

/* Biography Auto-Scroll */
.bio-scroll-wrapper {
    height: 350px;
    overflow-y: auto; /* Allow manual scroll */
    position: relative;
    padding-right: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.bio-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.bio-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.bio-scroll-content {
    animation: scrollBio 100s linear infinite; /* Slower animation */
    pointer-events: auto; /* Allow manual interaction if needed, though pointer-events: none was used to let scroll pass. Actually auto is better for selection. */
}

.bio-scroll-wrapper:hover .bio-scroll-content {
    animation-play-state: paused;
}

@keyframes scrollBio {
    0% { transform: translateY(0); }
    100% { transform: translateY(-70%); }
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1.5rem;
    transition: var(--transition);
}

body.dark-mode .theme-toggle {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .consultant-image-container {
        padding: 0;
        margin-bottom: 3rem;
    }
    
    .image-stack {
        width: 100% !important;
        max-width: 400px;
    }
}
