/**
 * Apple Design System Overrides
 * This file overrides Material Design styles with Apple Design aesthetics
 * Load this file AFTER css/style.css
 */

/* ============================================================================
   Typography - San Francisco Style
   ============================================================================ */

* {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif !important;
    letter-spacing: -0.01em;
}

body {
    font-weight: 400;
    line-height: 1.5;
    color: #1D1D1F;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1D1D1F;
}

h1 {
    font-weight: 700;
}

h2 {
    font-weight: 600;
}

h3, h4, h5, h6 {
    font-weight: 600;
}

p, li, span, div {
    letter-spacing: -0.01em;
}

/* ============================================================================
   Color Palette - Apple Colors
   ============================================================================ */

/* Replace Material Blue with Apple Blue */
:root {
    --apple-blue: #007AFF;
    --apple-blue-hover: #0051D5;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --border-color: #D2D2D7;
}

/* Links */
a {
    color: #007AFF;
}

a:hover {
    color: #0051D5;
}

/* Secondary text */
.content-card-summary,
.footer-description,
.breadcrumb-text {
    color: #6E6E73;
}

/* ============================================================================
   Buttons - Apple Style
   ============================================================================ */

.md-button,
.md-button-raised {
    background-color: #007AFF;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
    box-shadow: none !important;
    transition: background-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.md-button-raised {
    box-shadow: none !important;
}

.md-button:hover,
.md-button-raised:hover {
    background-color: #0051D5;
    box-shadow: none !important;
    transform: none;
}

.md-button:active,
.md-button-raised:active {
    background-color: #0051D5;
    transform: scale(0.98);
    box-shadow: none !important;
}

.md-button:focus,
.md-button-raised:focus {
    outline: 2px solid rgba(0, 122, 255, 0.3);
    outline-offset: 2px;
}

/* Remove ripple effects */
.md-button::before,
.md-button .ripple {
    display: none !important;
}

/* ============================================================================
   Cards - Apple Style
   ============================================================================ */

.content-card,
.institute-intro-card,
.institute-card,
.image-overlay-card,
.journal-cover-card,
.heritage-image-card {
    background-color: #FFFFFF;
    border: 1px solid #D2D2D7;
    border-radius: 14px;
    box-shadow: none !important;
    padding: 24px;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.content-card-body {
    padding: 24px;
}

.content-card:hover,
.institute-card:hover,
.image-overlay-card:hover,
.journal-cover-card:hover,
.heritage-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-color: #D2D2D7;
}

.institute-intro-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Card images */
.content-card-image,
.institute-card-image,
.image-overlay-card-image,
.journal-cover-image,
.heritage-image {
    border-radius: 10px;
}

.content-card-image-wrapper,
.institute-card-image-wrapper,
.image-overlay-card-image-wrapper {
    border-radius: 10px;
    overflow: hidden;
}

/* ============================================================================
   Navigation Bar - Apple Style
   ============================================================================ */

.md-navbar {
    height: 52px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none !important;
}

.md-navbar-container {
    height: 52px;
}

.md-navbar-logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.md-nav-link {
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 12px 20px;
    color: #1D1D1F;
}

.md-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #007AFF;
}

.md-nav-link.active {
    color: #007AFF;
    background-color: rgba(0, 122, 255, 0.08);
}

.md-nav-link-mobile {
    font-weight: 400;
    color: #1D1D1F;
}

.md-nav-link-mobile:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #007AFF;
}

.md-nav-link-mobile.active {
    color: #007AFF;
    background-color: rgba(0, 122, 255, 0.08);
}

/* ============================================================================
   Spacing & Layout - More Whitespace
   ============================================================================ */

body {
    padding-top: 52px;
}

.page-main-content {
    padding: 100px 20px;
}

.page-content-container {
    padding: 0;
}

.content-section {
    padding: 100px 16px;
}

.institute-intro,
.directors-message,
.recent-news {
    padding: 100px 16px;
}

.page-hero {
    margin-top: 52px;
}

/* Increase section spacing */
.content-section + .content-section {
    margin-top: 100px;
}

.institute-intro + .directors-message,
.directors-message + .recent-news,
.recent-news + .content-section {
    margin-top: 100px;
}

/* Increase element spacing */
.content-section-header {
    margin-bottom: 50px;
}

.recent-news-header,
.content-section-header {
    margin-bottom: 50px;
}

.content-card-body {
    gap: 16px;
}

/* Responsive spacing */
@media screen and (max-width: 768px) {
    .page-main-content {
        padding: 50px 16px;
    }

    .content-section,
    .institute-intro,
    .directors-message,
    .recent-news {
        padding: 50px 16px;
    }

    .content-section + .content-section,
    .institute-intro + .directors-message,
    .directors-message + .recent-news,
    .recent-news + .content-section {
        margin-top: 50px;
    }

    .content-section-header,
    .recent-news-header {
        margin-bottom: 32px;
    }
}

@media screen and (max-width: 480px) {
    .page-main-content {
        padding: 40px 12px;
    }

    .content-section,
    .institute-intro,
    .directors-message,
    .recent-news {
        padding: 40px 12px;
    }
}

/* ============================================================================
   Forms & Inputs - Apple Style
   ============================================================================ */

.search-input,
.sort-select {
    border: 1px solid #D2D2D7;
    border-radius: 8px;
    padding: 12px 16px;
    background-color: #FFFFFF;
    color: #1D1D1F;
    font-size: 16px;
    letter-spacing: -0.01em;
    transition: border-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.search-input:focus,
.sort-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-input::placeholder {
    color: #6E6E73;
}

/* ============================================================================
   Animations - Apple Style
   ============================================================================ */

* {
    transition-duration: 0.2s !important;
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Override specific longer transitions */
.content-card,
.institute-card,
.image-overlay-card,
.journal-cover-card,
.heritage-image-card {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.md-button,
.md-button-raised {
    transition: background-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Remove complex animations */
@keyframes ripple-animation {
    display: none;
}

/* ============================================================================
   Images - Apple Style
   ============================================================================ */

img {
    border-radius: 10px;
}

.content-card-image,
.institute-intro-image img,
.directors-photo,
.institute-card-image,
.image-overlay-card-image,
.journal-cover-image,
.heritage-image {
    border-radius: 10px;
}

/* Remove image overlays and filters */
.content-card-image-wrapper::before,
.image-overlay-card-overlay {
    border-radius: 10px;
}

/* ============================================================================
   Footer - Apple Style
   ============================================================================ */

.site-footer {
    background-color: #F5F5F5;
    color: #1D1D1F;
    padding: 80px 20px;
    border-top: 1px solid #D2D2D7;
}

.footer-heading {
    color: #1D1D1F;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.footer-logo-text {
    color: #1D1D1F;
    font-weight: 600;
}

.footer-description {
    color: #6E6E73;
}

.footer-link {
    color: #6E6E73;
}

.footer-link:hover {
    color: #007AFF;
    text-decoration: none;
}

.footer-contact-item .footer-link {
    color: #007AFF;
}

.footer-contact-item .footer-link:hover {
    color: #0051D5;
}

.footer-address {
    color: #6E6E73;
}

.footer-icon {
    color: #6E6E73;
}

.footer-copyright p {
    color: #6E6E73;
}

.footer-social-link {
    background-color: rgba(0, 0, 0, 0.05);
    color: #1D1D1F;
}

.footer-social-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #1D1D1F;
    transform: none;
}

/* ============================================================================
   Hero Sections - Apple Style
   ============================================================================ */

.page-hero {
    border-radius: 0;
}

.page-hero-news-blue {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 50%, #003D99 100%);
}

.page-hero-activities-green {
    background: linear-gradient(135deg, #34C759 0%, #28A745 50%, #1E7E34 100%);
}

.page-hero-achievements-orange {
    background: linear-gradient(135deg, #FF9500 0%, #E68900 50%, #CC7700 100%);
}

.page-hero-sub-institutes-purple {
    background: linear-gradient(135deg, #AF52DE 0%, #9C3DD9 50%, #7B2CBF 100%);
}

.page-hero-journal-pink {
    background: linear-gradient(135deg, #FF2D55 0%, #E6244A 50%, #CC1A3F 100%);
}

.page-hero-heritage-brown {
    background: linear-gradient(135deg, #A2845E 0%, #8B6F47 50%, #6B5435 100%);
}

.page-hero-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ============================================================================
   Breadcrumb - Apple Style
   ============================================================================ */

.breadcrumb-nav {
    background-color: #F5F5F5;
    border-bottom: 1px solid #D2D2D7;
}

.breadcrumb-link {
    color: #6E6E73;
}

.breadcrumb-link:hover {
    color: #007AFF;
}

.breadcrumb-current .breadcrumb-text {
    color: #1D1D1F;
    font-weight: 500;
}

.breadcrumb-icon {
    color: #6E6E73;
}

.breadcrumb-separator {
    color: #D2D2D7;
}

/* ============================================================================
   Carousel - Apple Style
   ============================================================================ */

.carousel-arrow {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #D2D2D7;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carousel-arrow:hover {
    background-color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    color: #1D1D1F;
    stroke: #1D1D1F;
}

.carousel-arrow:hover svg {
    stroke: #007AFF;
    color: #007AFF;
}

.carousel-dot {
    border-color: rgba(255, 255, 255, 0.6);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-dot.active {
    background-color: #FFFFFF;
    border-color: #FFFFFF;
}

/* ============================================================================
   Pagination - Apple Style
   ============================================================================ */

.pagination-btn {
    background-color: #FFFFFF;
    border: 1px solid #D2D2D7;
    border-radius: 8px !important;
    color: #1D1D1F;
    box-shadow: none;
    transition: background-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pagination-btn:hover:not(.active) {
    background-color: #F5F5F5;
    border-color: #007AFF;
    color: #007AFF;
    box-shadow: none;
}

.pagination-btn.active {
    background-color: #007AFF;
    border-color: #007AFF;
    color: #FFFFFF;
    box-shadow: none;
}

.pagination-ellipsis {
    color: #6E6E73;
}

/* ============================================================================
   Empty State - Apple Style
   ============================================================================ */

.list-empty-state {
    color: #6E6E73;
}

.list-empty-state h3 {
    color: #1D1D1F;
    font-weight: 600;
}

.empty-icon {
    color: #D2D2D7;
}

/* ============================================================================
   Loading Spinner - Apple Style
   ============================================================================ */

.list-loading {
    color: #6E6E73;
}

.list-loading-spinner {
    border-color: rgba(0, 122, 255, 0.2);
    border-top-color: #007AFF;
}

.carousel-loading-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
}

/* ============================================================================
   Content Card Badge - Apple Style
   ============================================================================ */

.content-card-badge {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    font-weight: 500;
}

/* ============================================================================
   Director's Message Section - Apple Style
   ============================================================================ */

.directors-message {
    background-color: #F5F5F5;
}

.directors-photo-wrapper {
    border: 1px solid #D2D2D7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.directors-photo-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: scale(1.02);
}

/* ============================================================================
   Institute Intro Section - Apple Style
   ============================================================================ */

.institute-intro {
    background-color: #F5F5F5;
}

.institute-intro-card {
    border: 1px solid #D2D2D7;
    box-shadow: none;
}

.institute-intro-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.institute-intro-image img {
    border-radius: 10px;
}

/* ============================================================================
   List Page Controls - Apple Style
   ============================================================================ */

.list-page-controls {
    margin-bottom: 40px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-icon {
    color: #6E6E73;
}

.filter-controls,
.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label,
.sort-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #1D1D1F;
    white-space: nowrap;
}

.filter-select,
.sort-select {
    border: 1px solid #D2D2D7;
    border-radius: 8px;
    padding: 10px 16px;
    background-color: #FFFFFF;
    color: #1D1D1F;
    font-size: 14px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: border-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 140px;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Loading Skeleton - Apple Style */
.list-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #6E6E73;
}

.list-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 122, 255, 0.2);
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: list-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes list-spin {
    to { transform: rotate(360deg); }
}

.list-loading p {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
    color: #6E6E73;
}

/* List Page Grid - Apple Style */
.list-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

@media screen and (max-width: 992px) {
    .list-page-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media screen and (max-width: 768px) {
    .list-page-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-bar {
        max-width: 100%;
    }

    .filter-controls,
    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }

    .filter-select,
    .sort-select {
        flex: 1;
        min-width: 0;
    }

    .list-page-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================================================================
   Override Material Design Shadows
   ============================================================================ */

.elevation-2,
.elevation-4 {
    box-shadow: none !important;
    border: 1px solid #D2D2D7;
}

/* Remove all Material Design elevation shadows */
[class*="elevation"],
[style*="box-shadow"]:not(.content-card):not(.institute-card):not(.image-overlay-card):not(.journal-cover-card):not(.heritage-image-card) {
    box-shadow: none !important;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media screen and (max-width: 768px) {
    .md-navbar {
        height: 52px;
    }

    .md-navbar-container {
        height: 52px;
    }

    body {
        padding-top: 52px;
    }
}

/* ============================================================================
   Additional Apple Design Refinements
   ============================================================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Remove focus outlines on mouse interaction, keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: rgba(0, 122, 255, 0.2);
    color: #1D1D1F;
}

/* ============================================================================
   Override Specific Material Design Components
   ============================================================================ */

/* Remove Material Design ripple effects completely */
.ripple {
    display: none !important;
}

/* Override any remaining Material Design colors */
.material-icons {
    color: inherit;
}

/* Ensure consistent border radius */
button,
input,
select,
textarea {
    border-radius: 8px;
}

/* ============================================================================
   Final Overrides for Consistency
   ============================================================================ */

/* Ensure all text uses Apple's color scheme */
.text-primary {
    color: #1D1D1F;
}

.text-secondary {
    color: #6E6E73;
}

.bg-primary {
    background-color: #FFFFFF;
}

.bg-secondary {
    background-color: #F5F5F5;
}

/* Override any remaining blue colors */
[style*="#1976D2"],
[style*="#1565C0"],
[style*="#0D47A1"] {
    color: #007AFF !important;
}

