/* ============================================================
   TSB Website v2 - Premium Redesign Styles
   Dropdown header, multi-column footer, stories page, polish
   ============================================================ */

/* Google Fonts - Inter loaded via <link> in HTML for performance */

/* ============================================================
   DROPDOWN NAVIGATION
   ============================================================ */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.dropdown-trigger i {
    font-size: 0.65rem;
    transition: transform var(--transition-medium);
}

.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 0.5rem 0;
    z-index: 100;
    border: 1px solid var(--border-light);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--background-light);
    color: var(--primary-orange);
    padding-left: 1.75rem;
}

/* CTA Button in Nav */
.btn-nav-cta {
    background: var(--primary-orange) !important;
    color: white !important;
    padding: 0.65rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none;
    transition: all 0.3s ease !important;
    white-space: nowrap;
    display: inline-block;
}

.btn-nav-cta:hover {
    background: var(--primary-orange-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(204, 85, 0, 0.35) !important;
}

.btn-nav-cta::after {
    display: none !important;
}

/* Nav menu spacing adjustment for new items */
.nav-menu {
    gap: 2rem !important;
}

/* ============================================================
   MOBILE DROPDOWN NAVIGATION
   ============================================================ */
@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
        text-align: center;
    }
    
    .dropdown-trigger {
        justify-content: center;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: var(--background-light);
        border-radius: 8px;
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    
    .nav-dropdown.open .dropdown-menu {
        max-height: 200px;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .dropdown-menu a:hover {
        padding-left: 1rem;
    }
    
    .btn-nav-cta {
        margin-top: 0.5rem;
        text-align: center;
        width: auto;
        display: inline-block !important;
    }
}

/* ============================================================
   MULTI-COLUMN FOOTER
   ============================================================ */
.footer {
    background: #0f172a !important;
    color: white;
    padding: 5rem 0 0 !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    padding-right: 2rem;
}

.footer-brand p {
    opacity: 0.75;
    line-height: 1.7;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--primary-orange);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    transition: all 0.2s ease;
}

.footer-col a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-info {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

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

.footer-social a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white !important;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0 !important;
}

.footer-social a:hover {
    background: var(--primary-orange);
    transform: translateY(-3px) !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    margin-top: 1rem;
}

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

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: white;
}

/* Footer responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col a:hover {
        transform: none;
    }
}

/* ============================================================
   STORIES PAGE STYLES
   ============================================================ */
.stories-section {
    padding: 3rem 0 5rem;
    background: var(--background-light);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.story-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.story-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.story-card-body {
    padding: 2rem;
}

.story-card-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.story-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.story-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.story-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.story-card-link:hover {
    gap: 0.75rem;
    color: var(--primary-orange-dark);
}

.story-card-link i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.story-card-link:hover i {
    transform: translateX(3px);
}

/* Story detail page */
.story-detail {
    padding: 2rem 0 5rem;
    background: white;
}

.story-detail .container {
    max-width: 800px;
}

.story-detail-header {
    margin-bottom: 2.5rem;
}

.story-detail-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.story-detail h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--secondary-blue);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.story-detail-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.story-detail-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
}

.story-detail-content p {
    margin-bottom: 1.5rem;
}

.story-detail-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-blue);
    margin: 2.5rem 0 1rem;
}

.story-detail-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-blue);
    margin: 2rem 0 0.75rem;
}

.story-detail-content blockquote {
    background: var(--background-light);
    border-left: 4px solid var(--primary-orange);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.story-detail-content img {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.story-detail-content .story-caption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: -1.25rem;
    margin-bottom: 2rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .story-detail h1 {
        font-size: 1.75rem;
    }
}

/* ============================================================
   DESIGN POLISH & PREMIUM FEEL
   ============================================================ */

/* Smoother overall typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Subtle section transitions */
section {
    transition: opacity 0.3s ease;
}

/* Better card hover states */
.expertise-card,
.product-card,
.diff-item {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Smoother hero carousel */
.carousel-slide {
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Premium button refinements */
.btn {
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary-orange) !important;
    box-shadow: 0 4px 14px rgba(204, 85, 0, 0.25);
}

.btn-primary:hover {
    background: var(--primary-orange-dark) !important;
    box-shadow: 0 8px 24px rgba(204, 85, 0, 0.35) !important;
}

/* Better section spacing for premium feel */
.section-header {
    margin-bottom: 3.5rem !important;
}

.section-header h2 {
    letter-spacing: -0.03em;
}

.section-header p {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in.visible {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Image loading - no opacity tricks that cause flicker */
img {
    opacity: 1;
}

/* ============================================================
   1. HOMEPAGE - WHO WE ARE SECTION LAYOUT FIX
   Text spans wider, reduces empty space, improves readability
   ============================================================ */
.who-we-are-section .section-header p {
    max-width: 900px !important;
    font-size: 1.1rem;
    line-height: 1.85;
}

.who-we-are-section .about-content {
    max-width: 100%;
}

.who-we-are-section .about-text {
    max-width: 100%;
}

.who-we-are-section .about-text p {
    max-width: 100%;
    font-size: 1.05rem;
    line-height: 1.85;
}

/* Make the about grid use more horizontal space */
.who-we-are-section .about-grid {
    max-width: 100%;
    gap: 3rem;
}

/* Ensure container in Who We Are uses full width */
.who-we-are-section > .container {
    max-width: 1200px;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 768px) {
    .who-we-are-section > .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .who-we-are-section .section-header p {
        max-width: 100% !important;
        font-size: 1rem;
    }
}

/* ============================================================
   4. FOOTER X (TWITTER) ICON FIX
   Ensure clear visibility and proper contrast
   ============================================================ */
/* X (Twitter) Inline SVG Icon - Matches Font Awesome icons exactly */
.x-icon-svg {
    width: 1.1em;
    height: 1.1em;
    display: block;
    fill: currentColor;
}

/* Contact page social links - X icon alignment */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-links .x-icon-svg {
    width: 1.35em;
    height: 1.35em;
    fill: currentColor;
}

/* ============================================================
   3. STORY CARD IMAGE CONSISTENCY
   Proper cropping and aspect ratio
   ============================================================ */
.story-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================================
   6. FOOTER PLACEHOLDER LINK STYLING
   ============================================================ */
.footer-placeholder {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.footer-placeholder::after {
    content: " (Coming Soon)";
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.7;
}
