/* ===== MOBILE FIRST: 320px - 640px ===== */
@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem;
    }

    h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem;
    }

    p {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    .nav-content {
        height: 3.5rem;
        padding: 0 0.75rem;
    }

    .nav-logo {
        gap: 0.5rem;
    }

    .logo-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .logo-text {
        display: none;
    }

    .logo-name-mobile {
        font-size: 0.9rem;
        display: block;
    }

    .nav-link,
    .mobile-nav-link,
    .quick-link-card,
    .btn,
    button {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .page {
        padding-top: 0;
    }

    .grid-3,
    .grid-2,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)) !important;
        gap: 1rem;
    }

    .book-card {
        padding: 1rem;
    }

    .event-gallery {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .event-major-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .event-major .event-media {
        height: 12rem;
    }

    .event-major .event-details {
        padding: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    i[data-lucide] {
        width: 20px;
        height: 20px;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .mb-3 {
        margin-bottom: 1.5rem;
    }

    .gap-2 {
        gap: 0.75rem;
    }
}

/* ===== TABLET: 641px - 1024px ===== */
@media (min-width: 641px) and (max-width: 1024px) {
    h1 {
        font-size: 2.25rem !important;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .nav-content {
        height: 4rem;
        padding: 0 1rem;
    }

    .logo-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .card {
        padding: 2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem;
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)) !important;
        gap: 1.5rem;
    }

    .event-gallery {
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)) !important;
        gap: 1.25rem;
    }

    .event-major-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem;
    }

    .event-major .event-media {
        height: 18rem;
    }

    .event-major .event-details {
        padding: 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

/* ===== DESKTOP: 1025px+ ===== */
@media (min-width: 1025px) {
    h1 {
        font-size: 3rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.875rem;
        margin-bottom: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .nav-content {
        height: 5rem;
        padding: 0 1.5rem;
    }

    .logo-icon {
        width: 3rem;
        height: 3rem;
    }

    .logo-text {
        display: block;
    }

    .logo-name-mobile {
        display: none;
    }

    .container {
        padding: 0 2rem;
    }

    .card {
        padding: 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem;
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)) !important;
        gap: 2rem;
    }

    .event-gallery {
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)) !important;
        gap: 2rem;
    }

    .event-major-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 3rem;
    }

    .event-major .event-media {
        height: 22rem;
    }

    .event-major .event-details {
        padding: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 3rem;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }
}

/* ===== LARGE DESKTOP: 1280px+ ===== */
@media (min-width: 1280px) {
    .container {
        padding: 0 3rem;
    }

    .section {
        padding: 5rem 0;
    }

    .card {
        padding: 3rem;
    }

    .grid-3,
    .grid-2 {
        gap: 2rem;
    }
}

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* Show on mobile */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }

    .hide-mobile {
        display: block !important;
    }
}

/* Flexible spacing utilities */
@media (max-width: 640px) {
    .px-mobile {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-mobile {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .gap-mobile {
        gap: 0.75rem;
    }
}

/* Text alignment for mobile */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Button sizing for mobile touch */
@media (max-width: 768px) {

    button,
    a.btn,
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Image responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Aspect ratio containers */
.aspect-square {
    aspect-ratio: 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Overflow prevention */
@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }

    .container,
    .card,
    .page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    table {
        font-size: 0.875rem;
        overflow-x: auto;
    }
}

/* Responsive hero adjustments */
@media (max-width: 640px) {
    .hero-section {
        min-height: 85vh;
    }

    .hero-content {
        gap: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-section {
        min-height: 90vh;
    }
}

/* Responsive form elements */
@media (max-width: 768px) {

    input,
    textarea,
    select {
        font-size: 16px;
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .container {
        max-width: 100%;
    }
}


/*actual*/
/* Mobile: 320px - 640px */
@media (max-width: 640px) {
    .hero-content {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 1.5rem;
    }

    .hero-section {
        padding-top: 1rem;
        min-height: auto;
        padding-bottom: 2rem;
    }

    .hero-title {
        font-size: 1.875rem !important;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    .hero-description {
        text-align: center;
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    .hero-photo {
        display: flex;
        justify-content: center;
        width: 100%;

    }

    .photo-wrapper {
        width: 14rem;
        height: 14rem;

    }

    .hero-text {
        text-align: center;
    }

    .quick-links {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .quick-link-card {
        min-height: 100px;
        padding: 1rem;
    }

    .hero-badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .mobile-nav-link {
        padding: 0.6rem 1rem;
        min-height: 44px;
    }

    .section {
        padding: 2rem 0 !important;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .card {
        padding: 1.5rem !important;
        border-radius: 1rem;
    }
}

/* Tablet: 641px - 1024px */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-content {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.25rem !important;
    }

    .hero-section {
        padding-top: 1rem;
    }

    .photo-wrapper {
        width: 16rem;
        height: 16rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-description {
        text-align: center;
    }

    .quick-links {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem;
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .section {
        padding: 3rem 0 !important;
    }

    .card {
        padding: 2rem !important;
    }
}

/* Desktop: 1025px+ */
@media (min-width: 1025px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .quick-links {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .section {
        padding: 4rem 0 !important;
    }
}

/* Large Desktop: 1280px+ */
@media (min-width: 1280px) {
    .container {
        padding: 0 2rem;
    }
}

.photo-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3e8ff, #fce7f3);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section {
    padding-top: 5.4rem;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    top: 1rem;
}

.profile-ring {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, #9333ea, #ec4899, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
}

@media (max-width: 992px) {
    .hero-badge {
        display: inline-flex;
        margin-top: 0.5rem;
        justify-content: center;
    }
}

.expertise-card {
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3e8ff;
    text-align: center;
    transition: all 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.08);
}

.expertise-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.expertise-icon-bg {
    width: 70px;
    height: 70px;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
}

.expertise-card:hover .expertise-icon-bg {
    transform: scale(1.12);
}

.expertise-icon-bg i {
    width: 32px;
    height: 32px;
    color: #7e22ce;
}

.footer-icon i {
    width: 1.4rem;
    height: 1.4rem;
    color: white;
}

.footer-dev-link {
    margin-top: 1rem;
    text-align: center;
}

.footer-dev-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    color: #ffffff;
    font-weight: 500;
    transition: 0.3s ease;
    backdrop-filter: blur(10px);
}

.footer-dev-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.footer-dev-btn i {
    width: 1.3rem;
    height: 1.3rem;
}

i[data-lucide] {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
}

.section-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.section-icon-box i[data-lucide] {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}