/* Instagram Theme - Global Styles */
:root {
    --instagram-purple: #833AB4;
    --instagram-pink: #FD1D1D;
    --instagram-orange: #F77737;
    --instagram-yellow: #FCAF45;
    --instagram-blue: #405DE6;
    --instagram-light-purple: #C13584;
    --instagram-gradient: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #F77737, #FCAF45, #FFDC80);
    --instagram-gradient-simple: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCAF45 100%);
    --instagram-gradient-purple: linear-gradient(135deg, #405DE6 0%, #833AB4 50%, #C13584 100%);
    --muji-purple: #8B7DA3;
    --muji-purple-dark: #7A6B92;
    --muji-purple-light: #9B88B4;
    --pastel-purple: #E8DAEF;
    --pastel-purple-light: #F5F0FF;
    --pastel-purple-medium: #E5D9F2;
    --pastel-purple-dark: #D4C5E8;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-white: #ffffff;
    --border-color: #E0D5F7;
    --hover-bg: #F8F4FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: #9B88B4; /* สีม่วงมินิมอล มูจิ */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
}

.logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--muji-purple);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 2px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-text p {
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 90px;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 18px;
    transition: all 0.3s ease;
    color: #8B7DA3;
}

.nav-link:hover {
    color: var(--muji-purple);
    background: var(--pastel-purple-light);
}

.nav-link:hover i {
    transform: scale(1.3) rotate(15deg);
    filter: drop-shadow(0 0 10px rgba(139, 125, 163, 0.5));
}

.nav-link.active {
    color: var(--muji-purple);
    background: var(--pastel-purple-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--muji-purple);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Instagram Cards */
.instagram-card {
    background: var(--pastel-purple-light);
    border: 1px solid var(--pastel-purple-medium);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(131, 58, 180, 0.1);
}

.instagram-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 125, 163, 0.15);
    border-color: var(--pastel-purple-dark);
}

.card-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--pastel-purple-medium);
    background: var(--pastel-purple);
}

.card-header-icon {
    width: 36px;
    height: 36px;
    background: #8B7DA3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 20px;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Hero Section */
.hero-instagram {
    background: #8B7DA3; /* สีม่วงมูจิเข้มขึ้นเล็กน้อย */
    padding: 60px 20px;
    text-align: center;
    color: white;
    border-radius: 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.hero-instagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-instagram h2 {
    font-size: 42px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    color: white;
}

.hero-instagram p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 0.95;
    color: white;
}

/* Story Highlights */
.story-highlights {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
    justify-content: center; /* จัดให้อยู่กึ่งกลาง */
    flex-wrap: wrap; /* ให้ตัดบรรทัดเมื่อเต็มจอ */
}

@media (max-width: 768px) {
    .story-highlights {
        justify-content: flex-start; /* บนมือถือให้เลื่อนได้ */
        flex-wrap: nowrap;
    }
}

.story-highlights::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.story-item:hover {
    transform: scale(1.1) translateY(-5px);
}

.story-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    padding: 3px;
    background-image: linear-gradient(135deg, #9B88B4, #8B7DA3);
    margin-bottom: 8px;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.story-circle::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: white;
    border-radius: 50%;
}

.story-icon {
    position: absolute;
    inset: 6px;
    background: #8B7DA3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    z-index: 1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.story-icon i {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.story-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Grid Layout */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Buttons */
.instagram-button {
    background: #8B7DA3; /* สีม่วงมูจิ */
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(139, 125, 163, 0.2);
}

.instagram-button:hover {
    background: #7A6B92; /* สีม่วงเข้มขึ้นเมื่อ hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 125, 163, 0.3);
}

.instagram-button-outline {
    background: transparent;
    color: #8B7DA3;
    border: 2px solid #8B7DA3;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.instagram-button-outline:hover {
    background: #8B7DA3;
    color: white;
    box-shadow: 0 3px 15px rgba(139, 125, 163, 0.2);
}

/* Footer */
.footer {
    background: var(--pastel-purple-light);
    border-top: 1px solid var(--pastel-purple-medium);
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--muji-purple);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #8B7DA3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.social-icon i {
    font-size: 20px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.social-icon:hover {
    background: #7A6B92;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Facebook iframe specific styles - CENTERED */
.facebook-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.facebook-iframe-container {
    width: 500px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.instagram-card iframe[src*="facebook.com"] {
    width: 500px !important;
    max-width: 100% !important;
    height: 600px !important;
    border: none !important;
    overflow: hidden !important;
    display: block;
    margin: 0 auto;
}

/* Remove the full-width styles */
.instagram-card:has(iframe[src*="facebook.com"]) .card-content {
    padding: 20px !important;
}

/* Responsive Facebook iframe */
@media (max-width: 768px) {
    .instagram-card iframe[src*="facebook.com"] {
        width: 100% !important;
        height: 500px !important;
        min-height: 500px !important;
    }
    
    .facebook-iframe-container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .container {
        padding: 40px 16px;
    }
}

@media (max-width: 540px) {
    .facebook-iframe-container {
        padding: 0 10px;
    }
}

/* Special sections with gradient background */
.instagram-card[style*="background: linear-gradient"] {
    background: var(--muji-purple) !important;
    color: white !important;
}

.instagram-card[style*="background: linear-gradient"] .card-content {
    color: white !important;
}

.instagram-card[style*="background: linear-gradient"] p {
    color: white !important;
}

/* Special Icon Effects */
.fa-graduation-cap:hover,
.fa-trophy:hover,
.fa-star:hover {
    animation: sparkle 0.6s ease-in-out;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 0 10px rgba(139, 125, 163, 0.5));
    }
    50% { 
        transform: scale(1.3) rotate(180deg);
        filter: brightness(1.3) drop-shadow(0 0 20px rgba(139, 125, 163, 0.8));
    }
}

/* Fix specific purple background elements */
blockquote {
    border-left-color: var(--instagram-purple);
    color: var(--instagram-purple);
}

.spec-item {
    background: var(--pastel-purple);
    color: var(--text-primary);
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    background: white;
    border: 1px solid var(--pastel-purple-medium);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--instagram-purple);
    box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.1);
}

/* Contact specific styles */
.contact-hero {
    background: #8B7DA3;
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.contact-card {
    background: var(--pastel-purple-light);
}

.contact-icon {
    background: #8B7DA3;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 15px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-text p {
        font-size: 12px;
    }
    
    .nav {
        top: 80px;
    }
    
    .nav-link {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .hero-instagram h2 {
        font-size: 32px;
    }
    
    .hero-instagram p {
        font-size: 16px;
    }
    
    .story-circle {
        width: 70px;
        height: 70px;
    }
    
    .story-icon {
        font-size: 28px;
    }
    
    .instagram-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--pastel-purple-medium);
    border-top: 3px solid var(--instagram-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional Wow Effects */
.fa-rocket {
    animation: fly 3s ease-in-out infinite;
}

@keyframes fly {
    0%, 100% { transform: translateY(0) rotate(-45deg); }
    50% { transform: translateY(-10px) rotate(-45deg); }
}

.fa-heart {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Make sure strong tags are purple */
strong {
    color: var(--instagram-purple);
    font-weight: 600;
}