:root {
    --primary: #0d2954;
    --accent: #737bd4;
    --dark: #1a1a1a;
    --light: #fdfaf5;
    --glass: rgba(255, 255, 255, 0.85);
    --bg-paper: #f4f1ea;
    --text-main: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

a{
    color: var(--primary);
    text-decoration: none;
    transition: border .3s ease-in-out;
    border: 1px dotted transparent;
}
a:hover{
    border-bottom: 1px dotted var(--primary);
    color: var(--dark);
}
/* --- Background Animation --- */
.bg-blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 163, 115, 0.2) 0%, rgba(253, 250, 245, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    transition: all 2s ease-in-out;
}

/* --- Header/Hero --- */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    /*background: linear-gradient(rgb(253 250 245 / 56%), rgb(220 245 255 / 78%)), url(../imgs/bg.png) center/cover no-repeat;*/
    background: linear-gradient(rgb(255 255 255 / 90%), rgb(3 169 244 / 39%)), url(../imgs/bg.png) center/cover no-repeat;
}

menu {
    background: var(--glass);
    padding: 7px 0;
    box-shadow: 0 10px 30px rgb(93 42 26 / 5%);
    border: 1px solid #e7e7e73b;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 99;
}
menu ul{
    list-style: no;
}
menu ul li{
    display: inline-block;
    text-transform: lowercase;
    margin: 0 10px;
    font-variant: small-caps;
    font-size: 1.2rem;
}

select#lang-select {
    background: var(--accent);
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
}

.festname{
    margin-bottom: 2rem;
    color: var(--primary);
}
.gateway_festname{
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-style: italic;
    color: var(--primary);
}
.gateway_nav{
    margin-top: 1em;
    margin-bottom: 3em;
}
.gateway_nav a{
    display: inline-block;
    margin: 10px;
    font-size: 1.4em;
    font-weight: bold;
    padding: 10px 70px;
    background: var(--glass);
    border-radius: 6px;
    text-transform: lowercase;
    font-variant: small-caps;
    box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all .3s ease-in-out;
}

.gateway_nav a:first-of-type{
    margin-top: 0;
}
.gateway_nav a:last-of-type{
    margin-bottom: 0;
}
.gateway_nav a:hover{
    background: var(--primary);
    color: var(--light);
}
.hero-tag {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero-tag.ar{
    letter-spacing: normal;
    font-size: 1.2em;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 2rem;
}
.festname.ar{
    font-size: 2.3em;
}
.hero-meta {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover, .btn-alt a.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

/* --- Sections --- */
section {
    padding: 100px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 10px;
}

.aligncenter{
    text-align: center;
}

#comingsoon, #media, #gallery, footer{
    background: rgba(212, 163, 115, 0.05);
}

#comingsoon{

}

#countdown{
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: var(--primary);
    line-height: 1.1;
    text-align: center;
}

#countdown span {
    font-family: serif;
    padding: 0 10px;
    display: inline-grid;
}

span.timeritem:after {
    font-size: 20px;
    font-variant: small-caps;
    letter-spacing: 1px;
    margin-top: -10px;
}

#timerdays:after{
    content: 'days'
}
#timerhours:after{
    content: 'hours'
}
#timerminutes:after{
    content: 'minutes'
}
#timerseconds:after{
    content: 'seconds'
}

.myicon{
    color: var(--accent);
    margin-bottom: 1rem;
}

.themes h2{
    margin-bottom: 3rem;
}

.btn-alt{
    margin: 3rem 0;
}

#aboutEdition .btn-alt, #gallery .btn-alt{
    margin-bottom: 0;
}

.btn-alt a.btn-primary{
    background: var(--accent);
    border-color: var(--accent);
}

/* --- Grid Layouts --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

#gallery .card{
    padding: 0;
    background: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(93, 42, 26, 0.05);
}

.card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* --- Call for Papers Table --- */
.cfp-box {
    background: var(--dark);
    color: white;
    padding: 4rem;
    border-radius: 30px;
    margin-top: 4rem;
}

.cfp-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.themes h2, .info-item h4{
    color: var(--accent);
}

.info-item h4
{
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-item p{
    font-size: 1.5rem
}

ul.partners, #gallery ul, footer ul {
    list-style: none;
}

ul.partners li {
    text-align: center;
}

ul.partners li img{
    max-width: 150px;
}
#founder img, #gallery img {
    width: 100%;
    border-radius: 20px;
}
/* about */

#about .intro-lead {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 50px;
    line-height: 1.4;
    color: var(--primary);
}

#about h3, #thihrdedition h2.subtitle {
    font-size: 1.4em;
    margin: 2em 0;
    font-weight: 400;
    border-bottom: 1px solid rgb(237 233 228);
    padding-bottom: 10px;
}

/* --- Philosophy Cards --- */
#about .lens-container, .grid {
    display: grid;
    gap: 20px;
    margin: 50px 0;
}

#about .lens-card, .grid div{
    background: var(--glass);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--light);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#about h4 {
    text-transform: uppercase;
    color: var(--primary);
}

/* --- Formats Section --- */
#about .formats-list {
    list-style: none;
    padding: 0;
}

#about .format-item {
    padding: 30px 0;
    border-bottom: 1px solid rgb(237 233 228);
}

#about strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--primary);
}


/*Editions*/

#editions summary {
    margin: 1em 0;
    padding: 1em;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    background-color: var(--accent);
}

#editions summary:hover {
    background-color: var(--primary);
    color: var(--light);
}

#editions .table-wrapper h3 {
    text-align: center;
    padding: 0.5em 0;
    border-radius: 6px;
    margin-bottom: 1em;
}

#editions table {
    margin: 0 0 1em 0;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

#editions table tr{
    border: 0;
}

#editions table th {
    font-size: 0.9em;
    font-weight: 400;
    padding: 1em;
    color: #fff;
    background-color: var(--primary);
    color: var(--light);
}

#editions table th:first-of-type {
    border-top-left-radius: 5px;
}

#editions table tbody tr {
    border: solid 1px;
    border-left: 0;
    border-right: 0;
    border-color: #dddddd;
}

table tbody tr:nth-child(2n + 1) {
    background-color: rgba(222, 222, 222, 0.25);
}

table td {
    padding: 0.75em 0.75em;
    vertical-align: middle;
}

/*founder*/

.prinfo h3{
    font-size: 2em;
}

/*third edition*/

/*#thihrdedition h2.subtitle {
  font-size: 1.6rem;
  margin-top: 50px;
  margin-bottom: 15px;
  }*/

  #thihrdedition h3 {
      font-size: 1.2rem;
      margin-top: 30px;
      margin-bottom: 10px;
      color: var(--primary);
  }

  #thihrdedition p {
      margin-bottom: 16px;
  }

  #thihrdedition .intro {
      font-size: 1.05rem;
      margin-bottom: 40px;
  }

  #thihrdedition .meta {
      font-size: 0.95rem;
      color: #555;
      margin-bottom: 30px;
  }

  #thihrdedition ul {
      margin: 15px 0 25px 20px;
  }

  #thihrdedition li {
      margin-bottom: 8px;
  }

  #thihrdedition .callout {
      background-color: var(--glass);
      padding: 25px;
      margin-top: 50px;
      border-radius: 20px;
      box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
      backdrop-filter: blur(10px);
      border: 1px solid var(--light);
  }

  #thihrdedition .thirdeditionfooter {
      margin-top: 60px;
      font-size: 0.9rem;
      color: #444;
  }

  /*gallery*/

  #mygallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Image Containers & Loading State --- */
@keyframes pulse {
    0% { background-color: #e0ddd5; }
    50% { background-color: #edeae3; }
    100% { background-color: #e0ddd5; }
}

.img-container {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: #e0ddd5;
    animation: pulse 1.5s infinite ease-in-out;
    cursor: zoom-in;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.img-container.loaded { animation: none; background: none; }

.img-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in, transform 0.6s ease;
}

.img-container img.visible { opacity: 1; }
.img-container:hover img { transform: scale(1.03); }

/* --- Lightbox / Fullscreen Overlay --- */
#lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#lightbox-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#lightbox-img.loaded { opacity: 1; }

/* --- UI Controls --- */
#close-btn {
    position: absolute;
    top: 20px; right: 30px;
    color: white; font-size: 3rem;
    cursor: pointer; z-index: 100001;
}

.nav-btn {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: white; font-size: 3rem;
    padding: 20px; cursor: pointer;
    z-index: 100001; transition: opacity 0.3s;
}

.nav-btn:hover { opacity: 0.6; }
#prev-btn { left: 10px; }
#next-btn { right: 10px; }
.hidden { visibility: hidden; }

/* --- Spinner --- */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    display: none;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

#sentinel { height: 50px; width: 100%; }

/* --- Footer --- */
footer ul li{
    display: inline-block;
}

.copyright{
    font-size: .8em;
    opacity: .8;
    text-align: center;
    padding-bottom: 100px;
}
.active{
    font-weight: bold;
    color: var(--accent);
}


/* Responsive */
@media (max-width: 768px) {
    section { padding: 60px 5%; }
    .cfp-box { padding: 2rem; }
}